Several small improvements + integrate options + first working draft of Cwda
[vchess.git] / client / src / variants / Threechecks.js
index 0525059..038d223 100644 (file)
@@ -1,6 +1,7 @@
 import { ChessRules } from "@/base_rules";
 
 export class ThreechecksRules extends ChessRules {
+
   static IsGoodFlags(flags) {
     // 4 for castle + 2 for checks (0,1 or 2)
     return !!flags.match(/^[01]{4,4}[012]{2,2}$/);
@@ -47,9 +48,9 @@ export class ThreechecksRules extends ChessRules {
     return super.getCurrentScore();
   }
 
-  static GenRandInitFen(randomness) {
+  static GenRandInitFen(options) {
     // Add check flags (at 0)
-    return ChessRules.GenRandInitFen(randomness).slice(0, -2) + "00";
+    return ChessRules.GenRandInitFen(options).slice(0, -2) + "00";
   }
 
   getFlagsFen() {
@@ -64,4 +65,5 @@ export class ThreechecksRules extends ChessRules {
     // Take number of checks into account
     return baseEval/5 - this.checkFlags["w"] + this.checkFlags["b"];
   }
+
 };