From 8e307e0617498eaa1d2a064225972ff3f69a90bc Mon Sep 17 00:00:00 2001 From: Andrin Fassbind Date: Fri, 10 Dec 2021 09:50:23 +0100 Subject: [PATCH] removed warning in SiedlerBoard --- src/ch/zhaw/catan/SiedlerBoard.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ch/zhaw/catan/SiedlerBoard.java b/src/ch/zhaw/catan/SiedlerBoard.java index fa72d2e..4e91ee6 100644 --- a/src/ch/zhaw/catan/SiedlerBoard.java +++ b/src/ch/zhaw/catan/SiedlerBoard.java @@ -206,7 +206,7 @@ public class SiedlerBoard extends HexBoard possibleRoads = checkRoadsSwitch(faction,2,roadsList,position); + ArrayList> possibleRoads = checkRoadsSwitch(faction,2,roadsList,position); if (add) { possibleRoads.get(1).addAll(possibleRoads.get(0)); roads.addAll(possibleRoads.get(1)); @@ -221,7 +221,7 @@ public class SiedlerBoard extends HexBoard possibleRoads = checkRoadsSwitch(faction,3,roadsList,position); + ArrayList> possibleRoads = checkRoadsSwitch(faction,3,roadsList,position); HashSet tallest; HashSet secondTallest; if (possibleRoads.get(0).size() >= possibleRoads.get(1).size()) { @@ -266,8 +266,8 @@ public class SiedlerBoard extends HexBoard checkRoadsSwitch(Config.Faction faction,int numberOfSwitches,List roadsList,Point position) { - ArrayList possibleRoads = new ArrayList<>(); + private ArrayList> checkRoadsSwitch(Config.Faction faction,int numberOfSwitches,List roadsList,Point position) { + ArrayList> possibleRoads = new ArrayList<>(); for (int i = 0;i list = new HashSet<>(); list.add(roadsList.get(i));