Allow listing buildings and resources when game is done

This commit is contained in:
Arne Keller 2020-03-12 18:08:23 +01:00
parent a738c23f5e
commit a7dab3cfa5

View File

@ -174,7 +174,7 @@ public class CardGame {
} }
public Deque<Card> getResources() throws LogicException { public Deque<Card> getResources() throws LogicException {
if (!gameActive()) { if (!gameStarted()) {
throw new LogicException("can not get resources: game not started"); throw new LogicException("can not get resources: game not started");
} }
// do not allow caller to modify internal queue // do not allow caller to modify internal queue
@ -182,7 +182,7 @@ public class CardGame {
} }
public List<Item> getItems() throws LogicException { public List<Item> getItems() throws LogicException {
if (!gameActive()) { if (!gameStarted()) {
throw new LogicException("can not get buildings: game not started"); throw new LogicException("can not get buildings: game not started");
} }
// do not allow caller to modify internal list // do not allow caller to modify internal list