import { CoregalRules } from "@/variants/Coregal";
export class TwokingsRules extends CoregalRules {
+
static get PawnSpecs() {
return Object.assign(
{},
if (['K','k'].includes(row[i])) kings[row[i]]++;
if (V.PIECES.includes(row[i].toLowerCase())) sumElts++;
else {
- const num = parseInt(row[i]);
+ const num = parseInt(row[i], 10);
if (isNaN(num)) return false;
sumElts += num;
}
// Not scanning king positions. In this variant, scan the board everytime.
scanKings() {}
- getCheckSquares(color) {
+ getCheckSquares() {
+ const color = this.turn;
let squares = [];
const oppCol = V.GetOppCol(color);
for (let i=0; i<V.size.x; i++) {
);
}
+ getPotentialQueenMoves(sq) {
+ return this.getSlideNJumpMoves(sq,
+ V.steps[V.ROOK].concat(V.steps[V.BISHOP]));
+ }
+
underCheck(color) {
const oppCol = V.GetOppCol(color);
for (let i=0; i<V.size.x; i++) {
}
postUndo() {}
+
};