par pitié
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user