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