Skip to content

Commit

Permalink
Added the limbo cards to game state
Browse files Browse the repository at this point in the history
  • Loading branch information
ForgottenArbiter committed Aug 24, 2019
1 parent e4fed5b commit 92fcaa5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/communicationmod/GameStateConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ private static HashMap<String, Object> getScreenState() {
* "discard_pile" (list): The list of cards in your discard pile
* "exhaust_pile" (list): The list of cards in your exhaust pile
* "hand" (list): The list of cards in your hand
* "limbo" (list): The list of cards that are in 'limbo', or currently being played.
* "player" (object): The state of the player
* "monsters" (list): A list of the enemies in the combat, including dead enemies
* Note: The order of the draw pile is not currently randomized when sent to the client.
Expand Down Expand Up @@ -518,10 +519,15 @@ private static HashMap<String, Object> getCombatState() {
for(AbstractCard card : AbstractDungeon.player.hand.group) {
hand.add(convertCardToJson(card));
}
ArrayList<Object> limbo = new ArrayList<>();
for(AbstractCard card : AbstractDungeon.player.limbo.group) {
limbo.add(convertCardToJson(card));
}
state.put("draw_pile", draw_pile);
state.put("discard_pile", discard_pile);
state.put("exhaust_pile", exhaust_pile);
state.put("hand", hand);
state.put("limbo", limbo);
state.put("player", convertPlayerToJson(AbstractDungeon.player));
return state;
}
Expand Down

0 comments on commit 92fcaa5

Please sign in to comment.