1 import { ChessRules
} from "@/base_rules";
3 export class BrotherhoodRules
extends ChessRules
{
5 getPotentialMovesFrom([x
, y
]) {
7 super.getPotentialMovesFrom([x
, y
]).filter(m
=> {
8 // Forbid capturing same piece's type:
10 m
.vanish
.length
== 1 ||
11 [V
.PAWN
, V
.KING
].includes(m
.vanish
[0].p
) ||
12 m
.vanish
[1].p
!= m
.vanish
[0].p
19 if (this.atLeastOneMove()) return "*";
21 return (this.turn
== "w" ? "0-1" : "1-0");