mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
fix for crash when was querying Stack zone from global getCardsIn(List<Zone>)
This commit is contained in:
@@ -79,6 +79,11 @@ public final class AllZoneUtil {
|
|||||||
public static CardList getCardsIn(final List<Constant.Zone> zones) {
|
public static CardList getCardsIn(final List<Constant.Zone> zones) {
|
||||||
CardList cards = new CardList();
|
CardList cards = new CardList();
|
||||||
for (Zone z: zones) {
|
for (Zone z: zones) {
|
||||||
|
if ( z == Zone.Stack) {
|
||||||
|
cards.addAll(AllZone.getStackZone().getCards());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
for (Player p : Singletons.getModel().getGameState().getPlayers()) {
|
for (Player p : Singletons.getModel().getGameState().getPlayers()) {
|
||||||
cards.addAll(p.getZone(z).getCards());
|
cards.addAll(p.getZone(z).getCards());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user