diff options
author | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-02 14:21:36 +0100 |
---|---|---|
committer | joffrey-bion <joffrey.bion@gmail.com> | 2021-02-02 14:21:36 +0100 |
commit | 9e85e6e6331552d1a426c318078f932ddf836795 (patch) | |
tree | f51cf625b4e1300b2422520ce831b0f2936be3dc /sw-server/src/main/kotlin | |
parent | Upgrade Krossbow to 1.1.5 (diff) | |
download | seven-wonders-9e85e6e6331552d1a426c318078f932ddf836795.tar.gz seven-wonders-9e85e6e6331552d1a426c318078f932ddf836795.tar.bz2 seven-wonders-9e85e6e6331552d1a426c318078f932ddf836795.zip |
Move prepareMove log before the actual preparation
This allows to see the attempted move in the logs in case of crash.
Diffstat (limited to 'sw-server/src/main/kotlin')
-rw-r--r-- | sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt index bc800dea..3313d22c 100644 --- a/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt +++ b/sw-server/src/main/kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt @@ -86,9 +86,9 @@ class GameController( // before the check. It shouldn't cause harm at the moment but could be harmful in the future. // 4. we don't want this code to run in the middle of unprepareMove's own lock synchronized(game) { + logger.info("Game {}: player {} preparing move {}", game.id, player, action.move) val preparedCardBack = game.prepareMove(player.index, action.move) val preparedCard = PreparedCard(player.username, preparedCardBack) - logger.info("Game {}: player {} prepared move {}", game.id, player, action.move) sendPreparedCard(game.id, preparedCard) if (game.allPlayersPreparedTheirMove()) { |