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