Skip to content

Commit cc17581

Browse files
committed
bug fix on player numbering
1 parent 23f1b90 commit cc17581

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/main/java/MinMax.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,10 @@ private static class BoardMove implements Comparable<BoardMove> {
168168
final int strength;
169169

170170
private BoardMove(final Move move, final Board board, final int player) {
171-
this.board = board.makeMove(move);
171+
final Move moveToBeMade = Board.ALL_MOVES[player][move.x][move.y];
172+
this.board = board.makeMove(moveToBeMade);
172173
this.strength = this.board.heuristicValue(player);
173-
this.move = move;
174+
this.move = moveToBeMade;
174175
}
175176

176177
@Override

0 commit comments

Comments
 (0)