mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 14:21:41 +02:00
Fix
This commit is contained in:
@@ -174,13 +174,12 @@ module.exports = class ChessCommand extends Command {
|
|||||||
if (gameState.turn === 'black') blackTime -= timeTaken - 5000;
|
if (gameState.turn === 'black') blackTime -= timeTaken - 5000;
|
||||||
if (gameState.turn === 'white') whiteTime -= timeTaken - 5000;
|
if (gameState.turn === 'white') whiteTime -= timeTaken - 5000;
|
||||||
const choice = this.parseSAN(gameState, moves, turn.first().content.toUpperCase().match(turnRegex));
|
const choice = this.parseSAN(gameState, moves, turn.first().content.toUpperCase().match(turnRegex));
|
||||||
game.move(choice[0], choice[1]);
|
|
||||||
console.log(gameState.pieces[choice[0]]);
|
|
||||||
if (gameState.pieces[choice[0]].toUpperCase() === 'P') {
|
if (gameState.pieces[choice[0]].toUpperCase() === 'P') {
|
||||||
fiftyRuleMove = 0;
|
fiftyRuleMove = 0;
|
||||||
} else {
|
} else {
|
||||||
fiftyRuleMove++;
|
fiftyRuleMove++;
|
||||||
}
|
}
|
||||||
|
game.move(choice[0], choice[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user