implemented copy with new player method for DiscoParty

This commit is contained in:
Gibstick 2013-07-19 11:42:25 -04:00
parent f92247c170
commit 1f13192aec

View File

@ -60,6 +60,22 @@ public class DiscoParty {
this.player = player;
}
// copy but with new player
/**
*
* @param player The new player to be stored
* @return A copy of the class with the new player
*/
public static DiscoParty DiscoParty(Player player) {
DiscoParty newParty = new DiscoParty(this.ds, player);
newParty.setDoFireworks(this.doFireworks);
newParty.setDuration(this.duration);
newParty.setPeriod(this.period);
newParty.setRadius(this.radius);
newParty.setSheep(this.sheep);
return newParty;
}
List<Sheep> getSheep() {
return sheepList;
}