Merge fix

This commit is contained in:
Oleg Agafonov 2023-11-28 08:14:01 +04:00
parent 2eac541b80
commit 1af601bf11
3 changed files with 7 additions and 20 deletions

View file

@ -103,11 +103,10 @@ public class GameSessionWatcher {
}
protected static void processWatchedHands(Game game, UUID userId, GameView gameView) {
Map<String, SimpleCardsView> handCards = new HashMap<>();
gameView.getWatchedHands().clear();
for (Player player : game.getPlayers().values()) {
if (player.hasUserPermissionToSeeHand(userId)) {
handCards.put(player.getName(), new SimpleCardsView(player.getHand().getCards(game), true));
gameView.setWatchedHands(handCards);
gameView.getWatchedHands().put(player.getName(), new SimpleCardsView(player.getHand().getCards(game), true));
}
}
}