1 import { ChessRules
} from "@/base_rules";
3 export class KothRules
extends ChessRules
{
15 const color
= V
.GetOppCol(this.turn
);
17 [3,4].includes(this.kingPos
[color
][0]) &&
18 [3,4].includes(this.kingPos
[color
][1])
20 // The middle is reached!
21 return color
== "w" ? "1-0" : "0-1";
23 return super.getCurrentScore();
28 let evaluation
= super.evalPosition();
29 // Ponder with king position:
33 Math
.abs(this.kingPos
["w"][0] - 3.5) +
34 Math
.abs(this.kingPos
["w"][1] - 3.5)
37 Math
.abs(this.kingPos
["b"][0] - 3.5) +
38 Math
.abs(this.kingPos
["b"][1] - 3.5)