diff --git a/src/ch/zhaw/catan/SiedlerBoard.java b/src/ch/zhaw/catan/SiedlerBoard.java index 64a2646..d560b7a 100644 --- a/src/ch/zhaw/catan/SiedlerBoard.java +++ b/src/ch/zhaw/catan/SiedlerBoard.java @@ -10,7 +10,7 @@ import java.util.*; public class SiedlerBoard extends HexBoard { - Map lowerFieldLabel = new HashMap<>(); + Map fields = new HashMap<>(); public void createFixGamefield(){ Map resourcePlacement = Config.getStandardLandPlacement(); @@ -21,10 +21,10 @@ public class SiedlerBoard extends HexBoard { String numberAsString = dicePlacement.get(resourceField.getKey()).toString(); char[] numbersInChar = numberAsString.toCharArray(); if (numberAsString.length() < 2) { - lowerFieldLabel.put(resourceField.getKey(), new Field(resourceField.getValue(), new Label('0', numbersInChar[0]))); + fields.put(resourceField.getKey(), new Field(resourceField.getValue(), new Label('0', numbersInChar[0]))); } else { - lowerFieldLabel.put(resourceField.getKey(), new Field(resourceField.getValue(), new Label(numbersInChar[0],numbersInChar[1]))); + fields.put(resourceField.getKey(), new Field(resourceField.getValue(), new Label(numbersInChar[0],numbersInChar[1]))); } } } @@ -32,15 +32,15 @@ public class SiedlerBoard extends HexBoard { private int getDiceNumber(Point field) { - Label label = lowerFieldLabel.get(field).getLabel(); + Label label = fields.get(field).getLabel(); return Integer.parseInt(label.toString()); } public String getTextView () { SiedlerBoardTextView view = new SiedlerBoardTextView(this); - for (Map.Entry e : lowerFieldLabel.entrySet()) { - view.setLowerFieldLabel(e.getKey(), e.getValue().getLabel()); + for (Map.Entry field : fields.entrySet()) { + view.setLowerFieldLabel(field.getKey(), field.getValue().getLabel()); } return view.toString(); } @@ -58,7 +58,7 @@ public class SiedlerBoard extends HexBoard { */ public List getFieldsForDiceValue(int dice) { ArrayList fields = new ArrayList<>(); - for(Point field : lowerFieldLabel.keySet()){ + for(Point field : this.fields.keySet()){ if(getDiceNumber(field) == dice){ fields.add(field); }