From: Benjamin Auder Date: Wed, 24 Mar 2021 18:55:14 +0000 (+0100) Subject: Fix Rococo X-Git-Url: https://git.auder.net/variants/Chakart/doc/scripts/assets/current/%7B%7B?a=commitdiff_plain;h=27ebf6afe4671ce23758724d308b2f9cf2b5b815;p=vchess.git Fix Rococo --- diff --git a/client/src/variants/Rococo.js b/client/src/variants/Rococo.js index 54533701..6af29c05 100644 --- a/client/src/variants/Rococo.js +++ b/client/src/variants/Rococo.js @@ -142,7 +142,8 @@ export class RococoRules extends ChessRules { // Pre-check: is thing on this square immobilized? const imSq = this.isImmobilized([x, y]); const piece = this.getPiece(x, y); - if (!!imSq && piece != V.KING) { + if (!!imSq) { + if (piece == V.KING) return []; // Only option is suicide, if I'm not a king: return [ new Move({