Finished problems implementation. TODO: specify state for Crazyhouse,Grand. Improve...
[vchess.git] / public / javascripts / variants / Wildebeest.js
index bb478cc..9b07410 100644 (file)
@@ -10,6 +10,10 @@ class WildebeestRules extends ChessRules
        static get CAMEL() { return 'c'; }
        static get WILDEBEEST() { return 'w'; }
 
+       static get PIECES() {
+               return ChessRules.PIECES.concat([V.CAMEL,V.WILDEBEEST]);
+       }
+
        static get steps() {
                return Object.assign(
                        ChessRules.steps, //add camel moves:
@@ -241,10 +245,9 @@ class WildebeestRules extends ChessRules
                        pieces[c][knight2Pos] = 'n';
                        pieces[c][rook2Pos] = 'r';
                }
-               let fen = pieces["b"].join("") +
+               return pieces["b"].join("") +
                        "/ppppppppppp/11/11/11/11/11/11/PPPPPPPPPPP/" +
                        pieces["w"].join("").toUpperCase() +
-                       " 1111";
-               return fen;
+                       " 1111 w";
        }
 }