let i = x + step[0];
let j = y + step[1];
while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) {
- moves.push(this.getBasicMove([x, y], [i, j]));
i += step[0];
j += step[1];
}
i += step[0];
j += step[1];
while (V.OnBoard(i, j) && this.board[i][j] == V.EMPTY) {
+ moves.push(this.getBasicMove([x, y], [i, j]));
i += step[0];
j += step[1];
}
evalPosition() {
let evaluation = super.evalPosition();
- if (this.turn == 'b')
+ if (this.turn == 'b' && !!this.reserve)
// Add reserves:
evaluation += this.reserve['b'][V.SOLDIER] * V.VALUES[V.SOLDIER];
return evaluation;