X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FRococo.js;h=6af29c0555dde5d3188d8f12caebc7e46eedebfe;hp=5453370184315676d0be4a820b4e28626ce6fd28;hb=27ebf6afe4671ce23758724d308b2f9cf2b5b815;hpb=fbc3e6f984492143625e438436f9c0a94e42c713 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({