mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Fix
This commit is contained in:
@@ -193,8 +193,8 @@ module.exports = class ChessCommand extends Command {
|
|||||||
fiftyRuleMove++;
|
fiftyRuleMove++;
|
||||||
}
|
}
|
||||||
game.move(choice[0], choice[1]);
|
game.move(choice[0], choice[1]);
|
||||||
if (pawnMoved && choice[1].endsWith(gameState.turn === 'black' ? '8' : '1')) {
|
if (pawnMoved && choice[1].endsWith(gameState.turn === 'white' ? '8' : '1')) {
|
||||||
game.board.configuration.pieces[choice[1]] = gameState.turn = 'black'
|
game.board.configuration.pieces[choice[1]] = gameState.turn === 'white'
|
||||||
? choice[2]
|
? choice[2]
|
||||||
: choice[2].toLowerCase()
|
: choice[2].toLowerCase()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user