import { shuffle } from "@/utils/alea";
export class MaximaRules extends ChessRules {
+
static get HasFlags() {
return false;
}
if (['K','k'].includes(row[i])) kings[row[i]]++;
if (['x'].concat(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;
}
this.kingPos["w"] = [i, k];
break;
default: {
- const num = parseInt(position[i].charAt(j));
+ const num = parseInt(position[i].charAt(j), 10);
if (!isNaN(num)) k += num - 1;
}
}
if (move.vanish.length > 1 && move.appear[0].p != V.KING) notation += "X";
return notation;
}
+
};