5b1c80ed636f4dc58452aba9a8d8949b098f67d0
1 import ChessRules
from "/base_rules.js";
2 import {FenUtil
} from "/utils/setupPieces.js";
4 export default class CapablancaRules
extends ChessRules
{
7 return ['q', 'e', 's', 'r', 'n', 'b'];
17 [1, 0], [-1, 0], [0, 1], [0, -1]
22 [1, 2], [1, -2], [-1, 2], [-1, -2],
23 [2, 1], [-2, 1], [2, -1], [-2, -1]
34 [1, 1], [1, -1], [-1, 1], [-1, -1]
39 [1, 2], [1, -2], [-1, 2], [-1, -2],
40 [2, 1], [-2, 1], [2, -1], [-2, -1]
47 return Object
.assign(newPieces
, super.pieces(color
, x
, y
));
58 genRandInitBaseFen() {
59 const s
= FenUtil
.setupPieces(
60 ['r', 'n', 's', 'b', 'q', 'k', 'b', 'e', 'n', 'r'],
62 randomness: this.options
["randomness"],
63 between: [{p1: 'k', p2: 'r'}],
69 fen: s
.b
.join("") + "/pppppppppp/91/91/91/91/PPPPPPPPPP/" +
70 s
.w
.join("").toUpperCase(),