1 import { Progressive1Rules
} from "@/variants/Progressive1";
2 import { SuicideRules
} from "@/variants/Suicide";
3 import { ChessRules
} from "@/base_rules";
4 import { randInt
} from "@/utils/alea";
6 export class Progressive2Rules
extends Progressive1Rules
{
8 static get PawnSpecs() {
16 static get HasFlags() {
20 static get HasEnpassant() {
25 const c
= move.turn
[0];
26 const piece
= move.vanish
[0].p
;
27 if (piece
== V
.KING
&& move.appear
.length
> 0) {
28 this.kingPos
[c
][0] = move.appear
[0].x
;
29 this.kingPos
[c
][1] = move.appear
[0].y
;
34 V
.UndoOnBoard(this.board
, move);
35 if (this.turn
!= move.turn
[0]) this.movesCount
--;
36 this.turn
= move.turn
[0];
37 this.subTurn
= move.turn
[1];
41 static GenRandInitFen(randomness
) {
42 return SuicideRules
.GenRandInitFen(randomness
);
51 q: 7, //slightly less than in orthodox game