blueLagoon: Added AI
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user