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