1 import { ChessRules
} from "@/base_rules";
3 export class PawnsRules
extends ChessRules
{
4 static get PawnSpecs() {
8 // The promotion piece doesn't matter, the game is won
9 { promotions: [V
.QUEEN
] }
13 static get HasFlags() {
19 static GenRandInitFen() {
20 return "8/pppppppp/8/8/8/8/PPPPPPPP/8 w 0 -";
32 const oppCol
= V
.GetOppCol(this.turn
);
33 if (this.board
.some(b
=>
34 b
.some(cell
=> cell
[0] == oppCol
&& cell
[1] != V
.PAWN
))
36 return (oppCol
== 'w' ? "1-0" : "0-1");
38 if (!this.atLeastOneMove()) return "1/2";
45 static get SEARCH_DEPTH() {