Added removed zone.

This commit is contained in:
marcins78@gmail.com
2011-12-15 13:21:51 +00:00
parent 3ba32684f9
commit e748925ba4
2 changed files with 9 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ public enum Zone implements Filterable {
HAND("hand", false, true, false), DISCARD("discard", false, true, false),
// Nobody sees
VOID("void", false, false, false), DECK("deck", false, false, false);
VOID("void", false, false, false), DECK("deck", false, false, false), REMOVED("removed", false, false, false);
private String _humanReadable;
private boolean _public;

View File

@@ -21,6 +21,7 @@ public class GameState {
private Map<String, List<PhysicalCardImpl>> _stacked = new HashMap<String, List<PhysicalCardImpl>>();
private Map<String, List<PhysicalCardImpl>> _voids = new HashMap<String, List<PhysicalCardImpl>>();
private Map<String, List<PhysicalCardImpl>> _removed = new HashMap<String, List<PhysicalCardImpl>>();
private List<PhysicalCardImpl> _inPlay = new LinkedList<PhysicalCardImpl>();
@@ -71,6 +72,7 @@ public class GameState {
_decks.put(playerId, new LinkedList<PhysicalCardImpl>());
_hands.put(playerId, new LinkedList<PhysicalCardImpl>());
_voids.put(playerId, new LinkedList<PhysicalCardImpl>());
_removed.put(playerId, new LinkedList<PhysicalCardImpl>());
_discards.put(playerId, new LinkedList<PhysicalCardImpl>());
_deadPiles.put(playerId, new LinkedList<PhysicalCardImpl>());
_stacked.put(playerId, new LinkedList<PhysicalCardImpl>());
@@ -304,6 +306,8 @@ public class GameState {
return _hands.get(playerId);
else if (zone == Zone.VOID)
return _voids.get(playerId);
else if (zone == Zone.REMOVED)
return _removed.get(playerId);
else if (zone == Zone.STACKED)
return _stacked.get(playerId);
else
@@ -549,6 +553,10 @@ public class GameState {
return Collections.unmodifiableList(_voids.get(playerId));
}
public List<? extends PhysicalCard> getRemoved(String playerId) {
return Collections.unmodifiableList(_removed.get(playerId));
}
public List<? extends PhysicalCard> getDeck(String playerId) {
return Collections.unmodifiableList(_decks.get(playerId));
}