Fix forbidden captures and checks within first move for Eightpieces variant
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 14 Mar 2020 20:42:54 +0000 (21:42 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 14 Mar 2020 20:42:54 +0000 (21:42 +0100)
client/src/variants/Eightpieces.js

index 465fbea..1033a5a 100644 (file)
@@ -683,11 +683,7 @@ export const VariantRules = class EightpiecesRules extends ChessRules {
       this.movesCount >= 2
         ? filteredMoves
         : filteredMoves.filter(m => {
-          return (
-            m.vanish.length <= 1 ||
-            m.appear.length != 1 ||
-            basicFilter(m, oppCol)
-          );
+          return (m.vanish.length <= 1 && basicFilter(m, oppCol));
         })
     ).concat(movesWithSentryPushes);
   }