summaryrefslogtreecommitdiff
path: root/sw-server/src/main/kotlin
diff options
context:
space:
mode:
authorjoffrey-bion <joffrey.bion@gmail.com>2021-02-02 14:21:36 +0100
committerjoffrey-bion <joffrey.bion@gmail.com>2021-02-02 14:21:36 +0100
commit9e85e6e6331552d1a426c318078f932ddf836795 (patch)
treef51cf625b4e1300b2422520ce831b0f2936be3dc /sw-server/src/main/kotlin
parentUpgrade Krossbow to 1.1.5 (diff)
downloadseven-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.kt2
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()) {
bgstack15