refactorer constructors

master
melvin 2012-08-19 16:00:13 +08:00
parent acf6a0c73a
commit adbbc91544
1 changed files with 8 additions and 16 deletions

View File

@ -26,28 +26,20 @@ public class MagicKickerChoice extends MagicChoice {
private final boolean multi; private final boolean multi;
private final boolean replicate; private final boolean replicate;
public MagicKickerChoice(final MagicManaCost cost,final boolean multi) { public MagicKickerChoice(final MagicChoice otherChoice, final MagicManaCost cost,final boolean multi,final boolean replicate) {
super("Choose how many times to pay the kicker cost.");
this.otherChoice=MagicChoice.NONE;
this.cost=cost;
this.multi=multi;
this.replicate = false;
}
public MagicKickerChoice(final MagicChoice otherChoice,final MagicManaCost cost,final boolean multi) {
super("Choose how many times to pay the kicker cost."); super("Choose how many times to pay the kicker cost.");
this.otherChoice=otherChoice; this.otherChoice=otherChoice;
this.cost=cost; this.cost=cost;
this.multi=multi; this.multi=multi;
this.replicate = false; this.replicate = replicate;
} }
public MagicKickerChoice(final MagicManaCost cost,final boolean multi,final boolean replicate) { public MagicKickerChoice(final MagicChoice otherChoice,final MagicManaCost cost,final boolean multi) {
super("Choose how many times to pay the kicker cost."); this(otherChoice, cost, multi, false);
this.otherChoice=MagicChoice.NONE; }
this.cost=cost;
this.multi=multi; public MagicKickerChoice(final MagicManaCost cost,final boolean multi) {
this.replicate = replicate; this(MagicChoice.NONE, cost, multi, false);
} }
@Override @Override