- Fixed InputSelectMany.

This commit is contained in:
Sloth
2012-11-17 21:12:34 +00:00
parent 6e73e0fc5e
commit 045a9fc1d4
2 changed files with 2 additions and 4 deletions

View File

@@ -5,9 +5,6 @@ import java.util.List;
import javax.swing.JOptionPane;
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import forge.Card;
import forge.Command;

View File

@@ -107,6 +107,7 @@ public abstract class InputSelectMany<T extends GameEntity> extends Input {
protected Input onCancel() { return null; }
protected boolean canCancelWithSomethingSelected() { return false; }
protected boolean hasEnoughTargets() { return selected.size() >= min; }
protected boolean hasAllTargets() { return selected.size() >= max; }
protected void selectEntity(T c)
@@ -116,7 +117,7 @@ public abstract class InputSelectMany<T extends GameEntity> extends Input {
this.selected.add(c);
this.showMessage();
if ( hasEnoughTargets() )
if ( hasAllTargets() )
selectButtonOK();
}