diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a3417b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/out/ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Faction.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Faction.class index d312fff..a9c9a44 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Faction.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Faction.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Land.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Land.class index 2a20065..a0e3700 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Land.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Land.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Resource.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Resource.class index 58f80c1..82c496d 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Resource.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Resource.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Structure.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Structure.class index 169ab41..cfb9237 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Structure.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config$Structure.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config.class index 922ab81..598fcb0 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Config.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$1.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$1.class index f4062e0..8567a9b 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$1.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$1.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$Actions.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$Actions.class index 3410db7..0d99f9f 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$Actions.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy$Actions.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy.class index d1759cf..09c27a7 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoard.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoard.class index ae45f03..4b09bb6 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoard.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoard.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoardTextView.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoardTextView.class index fd38f02..26d90d1 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoardTextView.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerBoardTextView.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerGame.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerGame.class index 1abbc24..984b723 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerGame.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/SiedlerGame.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Edge.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Edge.class index a034cf4..3a582a1 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Edge.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Edge.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/FieldAnnotationPosition.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/FieldAnnotationPosition.class index 50b3008..064c70d 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/FieldAnnotationPosition.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/FieldAnnotationPosition.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoard.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoard.class index 54b55a6..c212f56 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoard.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoard.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoardTextView.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoardTextView.class index d987cad..9904f75 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoardTextView.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/HexBoardTextView.class differ diff --git a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Label.class b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Label.class index 3dd5342..85f9148 100644 Binary files a/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Label.class and b/out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/hexboard/Label.class differ diff --git a/src/ch/zhaw/catan/Road.java b/src/ch/zhaw/catan/Road.java new file mode 100644 index 0000000..92ac502 --- /dev/null +++ b/src/ch/zhaw/catan/Road.java @@ -0,0 +1,17 @@ +package ch.zhaw.catan; + +import java.util.HashMap; + +public class Road { + private HashMap buildCost; + + public Road() { + buildCost = new HashMap<>(); + buildCost.put(Config.Resource.BRICK,1); + buildCost.put(Config.Resource.LUMBER,1); + } + + public HashMap getBuildCost() { + return buildCost; + } +} diff --git a/src/ch/zhaw/catan/Settlement.java b/src/ch/zhaw/catan/Settlement.java new file mode 100644 index 0000000..289e9e8 --- /dev/null +++ b/src/ch/zhaw/catan/Settlement.java @@ -0,0 +1,20 @@ +package ch.zhaw.catan; + +import java.util.HashMap; + +public class Settlement { + private HashMap buildCost; + + public Settlement() { + buildCost = new HashMap<>(); + buildCost.put(Config.Resource.LUMBER,1); + buildCost.put(Config.Resource.BRICK,1); + buildCost.put(Config.Resource.GRAIN,1); + buildCost.put(Config.Resource.WOOL,1); + } + + public HashMap getBuildCost() { + return buildCost; + } + +} diff --git a/src/ch/zhaw/catan/SiedlerGame.java b/src/ch/zhaw/catan/SiedlerGame.java index 48405eb..695b23a 100644 --- a/src/ch/zhaw/catan/SiedlerGame.java +++ b/src/ch/zhaw/catan/SiedlerGame.java @@ -212,7 +212,18 @@ public class SiedlerGame { * @return true, if the placement was successful */ public boolean buildRoad(Point roadStart, Point roadEnd) { - // TODO: Implement + //1. Check if Edge + if(!board.hasEdge(roadStart,roadEnd)){ + // TODO: Error message + } + //2. Check if Edge is empty + if(board.getEdge(roadStart,roadEnd) != null) { + // TODO: Error message + } + //3. Can Player build road + // TODO + + return false; }