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