Fix crash from bad cast

This commit is contained in:
drdev
2014-10-13 23:25:07 +00:00
parent 8d71ae5cbf
commit 76ad6691a9
2 changed files with 20 additions and 22 deletions

View File

@@ -2,7 +2,6 @@ package forge.game.cost;
import forge.game.card.Card;
import forge.game.card.CardCollection;
import forge.game.card.CardCollectionView;
import forge.game.card.CounterType;
import forge.game.mana.Mana;
import forge.game.player.Player;
@@ -26,7 +25,7 @@ public class PaymentDecision {
c = cnt;
}
private PaymentDecision(CardCollectionView chosen, List<Mana> manaProduced, List<Player> players,
private PaymentDecision(Iterable<Card> chosen, List<Mana> manaProduced, List<Player> players,
List<SpellAbility> sp) {
if (chosen != null) {
cards.addAll(chosen);
@@ -61,11 +60,11 @@ public class PaymentDecision {
return new PaymentDecision(c);
}
public static PaymentDecision card(CardCollectionView chosen) {
public static PaymentDecision card(Iterable<Card> chosen) {
return new PaymentDecision(chosen, null, null, null);
}
public static PaymentDecision card(CardCollectionView chosen, int n) {
public static PaymentDecision card(Iterable<Card> chosen, int n) {
PaymentDecision res = new PaymentDecision(chosen, null, null, null);
res.c = n;
return res;