program towards Interface rather than implementations

This commit is contained in:
Ingmar Goudt 2020-02-10 10:39:56 +01:00
parent b04c436801
commit ae7919cd07
100 changed files with 218 additions and 209 deletions

View file

@ -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) {