par pitié

This commit is contained in:
vaisse
2026-02-06 11:00:03 +01:00
parent 05871232bd
commit 98c6b4678e
4 changed files with 97 additions and 96 deletions

View File

@@ -35,10 +35,11 @@ public class HeuristicBot extends AbstractGamePlayer {
int size = board.getSize();
int center = size / 2;
float score = 0;
//HexBoard simBoard = (HexBoard) board.safeCopy();
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
if (board.getPlayerAt(i, j) == Player.PLAYER1) {
if (board.getCellPlayer(i, j) == Player.PLAYER1) {
score += Math.abs(i - center) + Math.abs(j - center); // Distance from center
}
}