// If this code is reached, rooks and king are on initial position
// Nothing on the path of the king ? (and no checks)
// If this code is reached, rooks and king are on initial position
// Nothing on the path of the king ? (and no checks)
// Nothing on final squares, except maybe king and castling rook?
for (i = 0; i < 2; i++) {
// Nothing on final squares, except maybe king and castling rook?
for (i = 0; i < 2; i++) {
// Did opponent king disappeared?
if (v.p == V.KING)
this.kingPos[this.turn] = [-1, -1];
// Or maybe a rook?
else if (v.p == V.ROOK) {
if (v.y < this.INIT_COL_KING[v.c])
// Did opponent king disappeared?
if (v.p == V.KING)
this.kingPos[this.turn] = [-1, -1];
// Or maybe a rook?
else if (v.p == V.ROOK) {
if (v.y < this.INIT_COL_KING[v.c])
}
getNotation(move) {
let notation = super.getNotation(move);
// Add a capture mark (not describing what is captured...):
if (move.vanish.length > 1 && move.appear.length == 1) {
}
getNotation(move) {
let notation = super.getNotation(move);
// Add a capture mark (not describing what is captured...):
if (move.vanish.length > 1 && move.appear.length == 1) {
// Pawn capture: remove initial "b" in bxc4 for example
notation = notation.substr(1);
notation = notation.replace("x","") + "X";
// Pawn capture: remove initial "b" in bxc4 for example
notation = notation.substr(1);
notation = notation.replace("x","") + "X";