Change castle flags. Eightpieces still not OK, but almost
[vchess.git] / client / src / variants / Shatranj.js
index b45d915..c364b81 100644 (file)
@@ -19,7 +19,8 @@ export const VariantRules = class ShatranjRules extends ChessRules {
   }
 
   static GenRandInitFen(randomness) {
-    return ChessRules.GenRandInitFen(randomness).replace("w 1111 -", "w");
+    // Remove castle flags and en-passant indication
+    return ChessRules.GenRandInitFen(randomness).slice(0, -7);
   }
 
   getPotentialPawnMoves([x, y]) {