diff --git a/src/comp1110/ass2/State.java b/src/comp1110/ass2/State.java index 503b18d..0672000 100644 --- a/src/comp1110/ass2/State.java +++ b/src/comp1110/ass2/State.java @@ -175,7 +175,7 @@ public class State { // Create a temporary array to store the shuffled stone circles Coord[] tempStoneCircleRandom = new Coord[32]; // Create a list to store the used cords (to avoid duplicates) - List usedCords = new ArrayList(); + List usedCords = new ArrayList<>(); // Shuffle the array for (int j = 0; j < 32; j++) { @@ -553,8 +553,7 @@ public class State { public int scoreLinks(int playerID) { Coord[] playerCoords = players[playerID].getPieces(); Set playerCoordsSet = new HashSet<>(Arrays.asList(playerCoords)); - int maxScore = findLongestLinkScore(playerCoordsSet, islands); - return maxScore; + return findLongestLinkScore(playerCoordsSet, islands); } /**