diff --git a/.idea/misc.xml b/.idea/misc.xml
index b573818..c3dfb30 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/ch/zhaw/catan/Road.java b/src/ch/zhaw/catan/Road.java
index 360e794..5131770 100644
--- a/src/ch/zhaw/catan/Road.java
+++ b/src/ch/zhaw/catan/Road.java
@@ -1,19 +1,8 @@
package ch.zhaw.catan;
-import java.util.HashMap;
-
-public class Road {
- private HashMap buildCost;
- private Config.Faction faction;
+public class Road extends Structure {
public Road(Config.Faction faction) {
- this.faction = faction;
- buildCost = new HashMap<>();
- buildCost.put(Config.Resource.BRICK,1);
- buildCost.put(Config.Resource.LUMBER,1);
- }
-
- public HashMap getBuildCost() {
- return buildCost;
+ super(faction);
}
}
diff --git a/src/ch/zhaw/catan/Structure.java b/src/ch/zhaw/catan/Structure.java
new file mode 100644
index 0000000..fc085a2
--- /dev/null
+++ b/src/ch/zhaw/catan/Structure.java
@@ -0,0 +1,9 @@
+package ch.zhaw.catan;
+
+public abstract class Structure {
+ private Config.Faction faction;
+
+ public Structure(Config.Faction faction) {
+ this.faction = faction;
+ }
+}