mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 05:51:42 +02:00
Fix
This commit is contained in:
@@ -183,7 +183,7 @@ module.exports = class ChessCommand extends Command {
|
|||||||
game.move(choice[0], choice[1]);
|
game.move(choice[0], choice[1]);
|
||||||
const finalRow = gameState.turn === 'black' ? '8' : '1';
|
const finalRow = gameState.turn === 'black' ? '8' : '1';
|
||||||
if (gameState.pieces[choice[1]].toUpperCase() === 'P' && choice[1].endsWith(finalRow)) {
|
if (gameState.pieces[choice[1]].toUpperCase() === 'P' && choice[1].endsWith(finalRow)) {
|
||||||
game.board.configuation.pieces[choice[1]] = gameState.turn = 'black'
|
game.board.configuration.pieces[choice[1]] = gameState.turn = 'black'
|
||||||
? choice[2]
|
? choice[2]
|
||||||
: choice[2].toLowerCase()
|
: choice[2].toLowerCase()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user