From 9e85e6e6331552d1a426c318078f932ddf836795 Mon Sep 17 00:00:00 2001 From: joffrey-bion Date: Tue, 2 Feb 2021 14:21:36 +0100 Subject: Move prepareMove log before the actual preparation This allows to see the attempted move in the logs in case of crash. --- .../kotlin/org/luxons/sevenwonders/server/controllers/GameController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw-server') 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()) { -- cgit