1 import { ChessRules
} from "@/base_rules";
3 export class VchessRules
extends ChessRules
{
4 static get PawnSpecs() {
8 { captureBackward: true }
12 isAttackedByPawn(sq
, color
) {
13 return this.isAttackedBySlideNJump(
23 let notation
= super.getNotation(move);
24 // If pawn captures backward, add an indication 'b'
26 move.appear
[0].p
== V
.PAWN
&&
28 (move.appear
[0].c
== 'w' && (move.end
.x
- move.start
.x
> 0)) ||
29 (move.appear
[0].c
== 'b' && (move.end
.x
- move.start
.x
< 0))