diff --git a/src/player/maurizio/MaurizioAI.java b/src/player/maurizio/MaurizioAI.java index 29c4e3f..52a58da 100644 --- a/src/player/maurizio/MaurizioAI.java +++ b/src/player/maurizio/MaurizioAI.java @@ -66,13 +66,13 @@ public class MaurizioAI implements Player { return moves1.peek(); } + //copy moves that do not loose LinkedList moves2 = new LinkedList(); for(int i : moves1){ moves2.add(i); } - //find the best of the non losing move - //look for two move wins + //look for two move wins among the non-loosing moves LinkedList removes = new LinkedList(); for(int i : moves2){ int[][] boardNew = makeMove(board, i, id); @@ -83,6 +83,7 @@ public class MaurizioAI implements Player { int[][] boardNewNew = makeMove(boardNew, j, enemyID); for(int k=0;k=0 && x < Game.GAME_COLUMNS) && (y>=0 && y < Game.GAME_ROWS)); } /** - * checks whether the last Move closed any lines on the board + * checks whether the last move closed any lines on the board */ private boolean checkWin(int[][] board, int col, int iD){ // find row of last move -- assuming the move was legal