From 27ebf6afe4671ce23758724d308b2f9cf2b5b815 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Wed, 24 Mar 2021 19:55:14 +0100
Subject: [PATCH] Fix Rococo

---
 client/src/variants/Rococo.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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({
-- 
2.44.0