diff --git a/src/ch/zhaw/catan/SiedlerGame.java b/src/ch/zhaw/catan/SiedlerGame.java index fa64686..b14895a 100644 --- a/src/ch/zhaw/catan/SiedlerGame.java +++ b/src/ch/zhaw/catan/SiedlerGame.java @@ -19,10 +19,10 @@ public class SiedlerGame { static final int FOUR_TO_ONE_TRADE_OFFER = 4; static final int FOUR_TO_ONE_TRADE_WANT = 1; - private SiedlerBoard board; - private ArrayList allPlayers; - private int winPointsForWin; - private Bank bank; + private final SiedlerBoard board; + private final ArrayList allPlayers; + private final int winPointsForWin; + private final Bank bank; private int activePlayer; /** @@ -222,7 +222,7 @@ public class SiedlerGame { Map> returnMap= new HashMap<>(); List diceValueFields = board.getFieldsForDiceValue(dicethrow); for (Player player : allPlayers) { - returnMap.put(player.getFaction(), new ArrayList()); + returnMap.put(player.getFaction(), new ArrayList<>()); for (Point field : diceValueFields) { List resources = board.getResourcesforFaction(field,player.getFaction()); for (Config.Resource resource : resources){ @@ -367,9 +367,9 @@ public class SiedlerGame { /** - * Can be used for both initial Settlement and normal Phase. - * @param roadStart - * @param roadEnd + * This Method is used to check if the chosen position for a road is valid or not. + * @param roadStart the coordinates where the road begins. + * @param roadEnd the coordinates where the roads ends. * @return */ private boolean validPositionForRoad(Point roadStart, Point roadEnd){