mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
program towards Interface rather than implementations
This commit is contained in:
parent
b04c436801
commit
ae7919cd07
100 changed files with 218 additions and 209 deletions
|
|
@ -517,7 +517,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
if (outcome.isGood()) {
|
||||
// good
|
||||
Cards cards = new CardsImpl(target.possibleTargets(sourceId, getId(), game));
|
||||
ArrayList<Card> cardsInHand = new ArrayList<>(cards.getCards(game));
|
||||
List<Card> cardsInHand = new ArrayList<>(cards.getCards(game));
|
||||
while (!target.isChosen()
|
||||
&& !target.possibleTargets(sourceId, getId(), game).isEmpty()
|
||||
&& target.getMaxNumberOfTargets() > target.getTargets().size()) {
|
||||
|
|
@ -1793,7 +1793,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
abilityControllerId = target.getAbilityController();
|
||||
}
|
||||
|
||||
ArrayList<Card> cardChoices = new ArrayList<>(cards.getCards(target.getFilter(), game));
|
||||
List<Card> cardChoices = new ArrayList<>(cards.getCards(target.getFilter(), game));
|
||||
while (!target.doneChosing()) {
|
||||
Card card = pickTarget(abilityControllerId, cardChoices, outcome, target, source, game);
|
||||
if (card != null) {
|
||||
|
|
@ -1824,7 +1824,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
abilityControllerId = target.getAbilityController();
|
||||
}
|
||||
|
||||
ArrayList<Card> cardChoices = new ArrayList<>(cards.getCards(target.getFilter(), game));
|
||||
List<Card> cardChoices = new ArrayList<>(cards.getCards(target.getFilter(), game));
|
||||
while (!target.doneChosing()) {
|
||||
Card card = pickTarget(abilityControllerId, cardChoices, outcome, target, null, game);
|
||||
if (card != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue