import { ArrayFun } from "@/utils/array";
import { randInt } from "@/utils/alea";
-export const VariantRules = class Antiking2Rules extends ChessRules {
+export class Antiking2Rules extends ChessRules {
static get ANTIKING() {
return "a";
}
this.antikingPos[c] = [move.start.x, move.start.y];
}
- getCurrentScore() {
- if (this.atLeastOneMove())
- return "*";
-
- const color = this.turn;
- const oppCol = V.GetOppCol(color);
- if (
- !this.isAttacked(this.kingPos[color], oppCol) &&
- this.isAttacked(this.antikingPos[color], oppCol)
- ) {
- return "1/2";
- }
- return color == "w" ? "0-1" : "1-0";
- }
-
static get VALUES() {
return Object.assign(
{ a: 1000 },