This commit is contained in:
Dragon Fire
2021-02-07 14:27:45 -05:00
parent 8719be1c23
commit 1b24e3c6ff
+2 -2
View File
@@ -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()
}