}
getPotentialMovesFrom([x, y]) {
- if (x >= V.size.x) {
+ if (x >= V.size.x)
// Reserves, outside of board: x == sizeX(+1)
return this.getReserveMoves([x, y]);
- }
// Standard moves
return super.getPotentialMovesFrom([x, y]);
}
if (!super.atLeastOneMove()) {
// Search one reserve move
for (let i = 0; i < V.RESERVE_PIECES.length; i++) {
- let moves = this.filterValid(
+ const moves = this.filterValid(
this.getReserveMoves([V.size.x + (this.turn == "w" ? 0 : 1), i])
);
if (moves.length > 0) return true;