diff options
author | jbion <joffrey.bion@amadeus.com> | 2019-02-23 05:02:12 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2019-02-23 05:02:43 +0100 |
commit | 288f8df9e4ffdfba6c6850ac10c700c2c5451135 (patch) | |
tree | a3103bbb3cfd18f23aafbf341cdd348a62e3ce37 /backend/src/main/kotlin | |
parent | Fix jar task to include frontend (diff) | |
download | seven-wonders-288f8df9e4ffdfba6c6850ac10c700c2c5451135.tar.gz seven-wonders-288f8df9e4ffdfba6c6850ac10c700c2c5451135.tar.bz2 seven-wonders-288f8df9e4ffdfba6c6850ac10c700c2c5451135.zip |
Send last card prepared event
Diffstat (limited to 'backend/src/main/kotlin')
-rw-r--r-- | backend/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/backend/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt b/backend/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt index 0cee6531..b37c9c7c 100644 --- a/backend/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt +++ b/backend/src/main/kotlin/org/luxons/sevenwonders/controllers/GameController.kt @@ -79,13 +79,12 @@ class GameController @Autowired constructor( val preparedCardBack = game.prepareMove(player.index, action.move) val preparedCard = PreparedCard(player.toDTO(principal.name), preparedCardBack) logger.info("Game {}: player {} prepared move {}", game.id, principal.name, action.move) + sendPreparedCard(game.id, preparedCard) if (game.allPlayersPreparedTheirMove()) { logger.info("Game {}: all players have prepared their move, executing turn...", game.id) val table = game.playTurn() sendPlayedMoves(game.id, table) - } else { - sendPreparedCard(game.id, preparedCard) } } |