Eightpieces almost ready
[vchess.git] / client / src / variants / Allmate2.js
index 0e515b2..828e459 100644 (file)
@@ -288,14 +288,14 @@ export const VariantRules = class Allmate2Rules extends ChessRules {
   }
 
   static get SEARCH_DEPTH() {
-    return 2;
+    return 1;
   }
 
   getNotation(move) {
     let notation = super.getNotation(move);
     // Add a capture mark (not describing what is captured...):
     if (move.vanish.length > 1 && move.appear.length == 1) {
-      if (notation.match(/^[a-h]x/))
+      if (!!(notation.match(/^[a-h]x/)))
         // Pawn capture: remove initial "b" in bxc4 for example
         notation = notation.substr(1);
       notation = notation.replace("x","") + "X";