1 import { ChessRules
} from "@/base_rules";
3 export class TitanRules
extends ChessRules
{
4 // Idea: yellow = bishop, orange = knight (for white)
5 // and, red = bishop + purple = knight (black side)
6 // (avoid using a bigger board, or complicated drawings)
8 // TODO: decode if piece + bishop or knight
11 // Code: a/c = bishop + knight/bishop j/l for king,
12 // m/o for knight, s/t for queen, u/v for rook
13 static get AUGMENTED_PIECES() {
19 getExtraPiece(symbol
) {
20 // TODO: switch ... case ... return b or n
23 // TODO: hook after any move from 1st rank,
24 // if piece not in usual list, bishop or knight appears.
25 getPotentialMovesFrom(sq
) {
26 let moves
= super.getPotentialMovesFrom(sq
);
27 const color
= this.turn
;
29 !ChessRules
.PIECES
.includes(this.board
[sq
[0]][sq
[1]][1]) &&
30 ((color
== 'w' && sq
[0] == 7) || (color
== "b" && sq
[0] == 0))
33 const newPiece
= this.getExtraPiece(this.board
[sq
[0]][sq
[1]][1])
48 // TODO: special case of move 1 = choose squares, knight first, then bishop