PlayerStartConditions is ok

GameNew won't fetch supplier twice
This commit is contained in:
Maxmtg
2012-10-21 12:05:56 +00:00
parent f76638a227
commit a76a8a8ff6
2 changed files with 4 additions and 3 deletions

View File

@@ -113,8 +113,9 @@ public class GameNew {
player.setStartingLife(p.getValue().getStartingLife());
// what if I call it for AI player?
PlayerZone bf = player.getZone(ZoneType.Battlefield);
if (p.getValue().getCardsOnTable() != null) {
for (final Card c : p.getValue().getCardsOnTable()) {
Iterable<Card> onTable = p.getValue().getCardsOnTable();
if (onTable != null) {
for (final Card c : onTable) {
c.addController(player);
c.setOwner(player);
bf.add(c, false);

View File

@@ -22,7 +22,7 @@ public class PlayerStartConditions {
return startingLife;
}
public final Iterable<Card> getCardsOnTable() {
return cardsOnTable.get();
return cardsOnTable == null ? null : cardsOnTable.get();
}
public final void setStartingLife(int startingLife) {