mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix
This commit is contained in:
@@ -210,6 +210,7 @@ module.exports = class ChessCommand extends Command {
|
||||
const possiblePieces = Object.keys(gameState.pieces).filter(piece => {
|
||||
if (gameState.pieces[piece] !== initial) return false;
|
||||
if (move[2] && !piece.startsWith(move[2])) return false;
|
||||
if (!moves[piece]) return false;
|
||||
return moves[piece].includes(move[3]);
|
||||
});
|
||||
if (possiblePieces.length === 1) return [possiblePieces[0], move[3]];
|
||||
|
||||
Reference in New Issue
Block a user