From a19f6e371cc996d01bea43bfb09b517fa0064743 Mon Sep 17 00:00:00 2001 From: Immanuel Alvaro Bhirawa Date: Wed, 10 May 2023 19:21:52 +1000 Subject: [PATCH] Removed some warnings for the whole code Signed-off-by: Immanuel Alvaro Bhirawa --- src/comp1110/ass2/State.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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); } /**