Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinegreuzard committed Nov 1, 2024
1 parent ebc3cb3 commit 7896eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const centerControlBonus: { [key: string]: number } = {
export function evaluateKingSafety(board: Board, color: PieceColor): number {
const kingPosition = board.findKing(color);
return kingPosition &&
board.isSquareUnderAttack(kingPosition.x, kingPosition.y, color)
board.isSquareUnderAttack(kingPosition.x, kingPosition.y, color)
? -0.5
: 0;
}
Expand Down

0 comments on commit 7896eb9

Please sign in to comment.