Fixed multiple NPE errors in cards;

This commit is contained in:
Oleg Agafonov 2020-01-28 03:37:49 +04:00
parent 285ed5801f
commit 105062beb7
14 changed files with 104 additions and 94 deletions

View file

@ -285,6 +285,9 @@ public final class ZonesHandler {
public static List<Card> chooseOrder(String message, Cards cards, Player player, Game game) {
List<Card> order = new ArrayList<>();
if (cards.isEmpty()) {
return order;
}
TargetCard target = new TargetCard(Zone.ALL, new FilterCard(message));
target.setRequired(true);
while (player.isInGame() && cards.size() > 1) {