From 1b24e3c6ff4a7ecf9fae2c7fa2f5304c7ff6c362 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 7 Feb 2021 14:27:45 -0500 Subject: [PATCH] Fix --- commands/games-mp/chess.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/games-mp/chess.js b/commands/games-mp/chess.js index c0b4e553..00264729 100644 --- a/commands/games-mp/chess.js +++ b/commands/games-mp/chess.js @@ -193,8 +193,8 @@ module.exports = class ChessCommand extends Command { fiftyRuleMove++; } game.move(choice[0], choice[1]); - if (pawnMoved && choice[1].endsWith(gameState.turn === 'black' ? '8' : '1')) { - game.board.configuration.pieces[choice[1]] = gameState.turn = 'black' + if (pawnMoved && choice[1].endsWith(gameState.turn === 'white' ? '8' : '1')) { + game.board.configuration.pieces[choice[1]] = gameState.turn === 'white' ? choice[2] : choice[2].toLowerCase() }