1 import { ChessRules
} from "@/base_rules";
3 export class DiscoduelRules
extends ChessRules
{
9 static get PawnSpecs() {
13 { promotions: [V
.PAWN
] }
17 static get HasFlags() {
23 static GenRandInitFen() {
24 return "1n4n1/8/8/8/8/8/PPPPPPPP/8 w 0 -";
27 getPotentialMovesFrom(sq
) {
28 const moves
= super.getPotentialMovesFrom(sq
);
30 // Prevent pawn captures on last rank:
31 return moves
.filter(m
=> m
.vanish
.length
== 1 || m
.vanish
[1].x
!= 0);
44 // No real winning condition (promotions count...)
45 if (!this.atLeastOneMove()) return "1/2";
52 static get SEARCH_DEPTH() {