1 import { ChessRules
, PiPo
, Move
} from "@/base_rules";
3 export const VariantRules
= class RifleRules
extends ChessRules
{
4 static get HasEnpassant() {
5 // Due to the capturing mode, en passant is disabled
9 getBasicMove([sx
, sy
], [ex
, ey
], tr
) {
16 if (this.board
[ex
][ey
] != V
.EMPTY
) {
17 // No movement: just vanishing enemy piece
22 c: this.getColor(ex
, ey
),
23 p: this.getPiece(ex
, ey
)
33 c: tr
? tr
.c : this.getColor(sx
, sy
),
34 p: tr
? tr
.p : this.getPiece(sx
, sy
)
41 c: this.getColor(sx
, sy
),
42 p: this.getPiece(sx
, sy
)