Draft Coregal variant - still getCastleMoves() and updateCastleFlags() TODO
[vchess.git] / client / src / variants / Wildebeest.js
index f4e3b83..5bb50e8 100644 (file)
@@ -2,7 +2,7 @@ import { ChessRules } from "@/base_rules";
 import { ArrayFun } from "@/utils/array";
 import { sample, randInt } from "@/utils/alea";
 
-export const VariantRules = class WildebeestRules extends ChessRules {
+export class WildebeestRules extends ChessRules {
   static get size() {
     return { x: 10, y: 11 };
   }
@@ -225,10 +225,7 @@ export const VariantRules = class WildebeestRules extends ChessRules {
   }
 
   getCurrentScore() {
-    if (this.atLeastOneMove())
-      // game not over
-      return "*";
-
+    if (this.atLeastOneMove()) return "*";
     // No valid move: game is lost (stalemate is a win)
     return this.turn == "w" ? "0-1" : "1-0";
   }