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(
15 sq
, color
, V
.PAWN
, V
.steps
[V
.BISHOP
], 1);
19 let notation
= super.getNotation(move);
20 // If pawn captures backward, add an indication 'b'
22 move.appear
[0].p
== V
.PAWN
&&
24 (move.appear
[0].c
== 'w' && (move.end
.x
- move.start
.x
> 0)) ||
25 (move.appear
[0].c
== 'b' && (move.end
.x
- move.start
.x
< 0))