- if (V.PawnSpecs.canCapture) {
- for (let shiftY of [-1, 1]) {
- if (
- y + shiftY >= 0 &&
- y + shiftY < sizeY
- ) {
- if (
- this.board[x + shiftX][y + shiftY] != V.EMPTY &&
- this.canTake([x, y], [x + shiftX, y + shiftY])
- ) {
- moves.push(this.getBasicMove([x, y], [x + shiftX, y + shiftY]));
- }
- }
+ for (let shiftY of [-1, 1]) {
+ if (
+ y + shiftY >= 0 && y + shiftY < 8 &&
+ this.board[x + shiftX][y + shiftY] != V.EMPTY &&
+ this.canTake([x, y], [x + shiftX, y + shiftY])
+ ) {
+ moves.push(this.getBasicMove([x, y], [x + shiftX, y + shiftY]));