blueLagoon: Added AI

This commit is contained in:
2023-04-24 21:07:16 +10:00
parent 3e04727e7c
commit a9a7ddef94
5 changed files with 210 additions and 19 deletions

View File

@@ -611,6 +611,7 @@ public class BlueLagoon {
scores[i] = state.scoreTotalIslands(i);
}
return scores;
}
/*// ArrayList<Integer> islandCoords = islandCoords(stateString);
@@ -673,7 +674,7 @@ public class BlueLagoon {
// check the size of the arrayList to set the size for the int[]
}
return new int[]{0, 0}; // FIXME Task 11*/
return new int[]{0, 0};
}
// for (int i = 9; i < parseSplit.length; i++) {
@@ -698,6 +699,8 @@ public class BlueLagoon {
// }
// }
// }
*/
/**
* Given a state string, calculate the "Links" portion of the score for
@@ -882,6 +885,7 @@ public class BlueLagoon {
* @return a move string generated by an AI
*/
public static String generateAIMove(String stateString){
return ""; // FIXME Task 16
State state = new State(stateString);
return state.getCurrentPlayer().createAIMove(state);
}
}