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