From 13102cabeb4e8c626f1c849369785c174f7aa512 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Thu, 12 Mar 2020 12:16:38 +0100
Subject: [PATCH] Fix some typos

---
 client/src/variants/Eightpieces.js | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/client/src/variants/Eightpieces.js b/client/src/variants/Eightpieces.js
index dfab43d7..ead98299 100644
--- a/client/src/variants/Eightpieces.js
+++ b/client/src/variants/Eightpieces.js
@@ -165,7 +165,7 @@ export const VariantRules = class EightpiecesRules extends ChessRules {
         return this.getPotentialJailerMoves([x, y]);
       case V.SENTRY:
         return this.getPotentialSentryMoves([x, y]);
-      case V.LANCER
+      case V.LANCER:
         return this.getPotentialLancerMoves([x, y]);
       default:
         return super.getPotentialMovesFrom([x, y]);
@@ -184,10 +184,10 @@ export const VariantRules = class EightpiecesRules extends ChessRules {
   }
 
   getAllValidMoves() {
-    let moves = super.getAllValidMoves().filter(m =>
+    let moves = super.getAllValidMoves().filter(m => {
       // Remove jailer captures
-      m.vanish[0].p != V.JAILER || m.vanish.length == 1;
-    );
+      return m.vanish[0].p != V.JAILER || m.vanish.length == 1;
+    });
     const L = this.sentryPush.length;
     if (!!this.sentryPush[L-1] && this.subTurn == 1) {
       // Delete moves walking back on sentry push path
@@ -234,12 +234,14 @@ export const VariantRules = class EightpiecesRules extends ChessRules {
     // Augment with pass move is the king is immobilized:
     const jsq = this.isImmobilized([x, y]);
     if (!!jsq) {
-      moves.push(new Move({
-        appear: [],
-        vanish: [],
-        start: { x: x, y: y },
-        end: { x: jsq[0], y: jsq[1] }
-      });
+      moves.push(
+        new Move({
+          appear: [],
+          vanish: [],
+          start: { x: x, y: y },
+          end: { x: jsq[0], y: jsq[1] }
+        })
+      );
     }
     return moves;
   }
-- 
2.44.0