const fenParsed = V.ParseFen(fen);
this.pocket = {
"w": {
- h: parseInt(fenParsed.pocket[0]),
- e: parseInt(fenParsed.pocket[1])
+ h: parseInt(fenParsed.pocket[0], 10),
+ e: parseInt(fenParsed.pocket[1], 10)
},
"b": {
- h: parseInt(fenParsed.pocket[2]),
- e: parseInt(fenParsed.pocket[3])
+ h: parseInt(fenParsed.pocket[2], 10),
+ e: parseInt(fenParsed.pocket[3], 10)
}
};
}
([V.HAWK, V.ELEPHANT, V.NOTHING].includes(move.appear[0].p) ? 1 : 0);
this.kingPos[color][0] = move.appear[shift].x;
this.kingPos[color][1] = move.appear[shift].y;
- return;
}
this.updateCastleFlags(move, piece);