- return moves;
- }
-
- isAttacked(sq, color) {
- return (
- super.isAttacked(sq, color) ||
- this.isAttackedByBN(sq, color) ||
- this.isAttackedByRN(sq, color) ||
- this.isAttackedByQN(sq, color)
- );
- }
-
- isAttackedByBN(sq, color) {
- return (
- this.isAttackedBySlideNJump(sq, color, V.BN, V.steps[V.BISHOP]) ||
- this.isAttackedBySlideNJump(
- sq, color, V.BN, V.steps[V.KNIGHT], 1)
- );
- }
-
- isAttackedByRN(sq, color) {
- return (
- this.isAttackedBySlideNJump(sq, color, V.RN, V.steps[V.ROOK]) ||
- this.isAttackedBySlideNJump(
- sq, color, V.RN, V.steps[V.KNIGHT], 1)
- );
- }
-
- isAttackedByQN(sq, color) {
- return (
- this.isAttackedBySlideNJump(
- sq, color, V.QN, V.steps[V.BISHOP].concat(V.steps[V.ROOK])) ||
- this.isAttackedBySlideNJump(
- sq, color, V.QN, V.steps[V.KNIGHT], 1)
- );
- }
-
- static get VALUES() {
- return Object.assign(
- { a: 12, e: 7, s: 5 },
- ChessRules.VALUES
- );
- }
-
- getNotation(move) {
- let notation = super.getNotation(move);
- if (move.vanish[0].p != V.PAWN && move.appear[0].p != move.vanish[0].p)
- // Fusion (not from a pawn: handled in ChessRules)
- notation += "=" + move.appear[0].p.toUpperCase();
- return notation;