From 3adec5bd43c20470d1890558e80f8cd360a9bbc2 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Fri, 26 Nov 2021 11:25:56 +0100 Subject: [PATCH] changed Datatype of Road and Settlement in SiedlerBoard --- .idea/misc.xml | 2 +- .../ch/zhaw/catan/Dummy$1.class | Bin 702 -> 702 bytes .../ch/zhaw/catan/Dummy$Actions.class | Bin 1113 -> 1113 bytes .../ch/zhaw/catan/Dummy.class | Bin 3788 -> 0 bytes .../ch/zhaw/catan/SiedlerBoard.class | Bin 5365 -> 5365 bytes .../ch/zhaw/catan/SiedlerGame.class | Bin 2740 -> 2740 bytes src/ch/zhaw/catan/Dummy.java | 5 ++--- src/ch/zhaw/catan/Road.java | 4 +++- src/ch/zhaw/catan/Settlement.java | 4 +++- src/ch/zhaw/catan/SiedlerBoard.java | 2 +- 10 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 out/production/gruppe06-hufflepuff-projekt3-catan/ch/zhaw/catan/Dummy.class diff --git a/.idea/misc.xml b/.idea/misc.xml index 6bc01a8..c3dfb30 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file 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 8567a9baf96bfafe29eaf344e89d39a5ee1dcf7d..f4062e0543dd7a05698bdfc914692770f987eff1 100644 GIT binary patch delta 23 fcmdnTx{sCP)W2Q(7#J9AH*%yiF{({2VDbY1X~qYr delta 23 fcmdnTx{sCP)W2Q(7#J9AHgcphF{)24VDbY1X}|}l 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 0d99f9f2a2000f589248dd6620c2a76c84bb5e38..3410db753ca6458025bf856739f3d98ae36bec03 100644 GIT binary patch delta 17 Zcmcb~ag&4N)W2Q(7#J9AH*y5B002Xf237z7 delta 17 Zcmcb~ag&4N)W2Q(7#J9AHgW{A002Xa22}t6 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 deleted file mode 100644 index 09c27a7c753f40354200852b54a7f35916c4c323..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3788 zcmb7H`F9&v75<*Jj4V&$Eq0=;imN1+Q%6ZlO>LPtt`{mQ+r>5xPH15)P2@?W88aTm zaamfREiG%<2}{`tP?k0nJFZC@plk)sfzx03TR0rT_hzJ6@=}V@`foIVs?4k57dWLalUO~}wYP8h9-NM?2m1lm)n_*5=duq7G$qy1;!~VBX^-D7{b&0e# zqvyluMz74%+hm>w2I5n7=))-m{VE>7fWWpjOyW_>b44oq{!%QJtZt+uzHv&ykU(46 zmyLpwik~v{g)j#3cInrH0tedH$)Hk!Os4es9V#9|no7`3$6lP!>0=|+z2-cpl64rx zn1Y8@yc6S9p}7k}hNIgWtB-6|txc8Y2{4IwDVS1m8t-Nv*5Jz~O!%xeKguZFsy`!F zoKbNW?-B5u?(~i_b|rZV9u;U_!z0(RAsI>?9>M!mXc8dE3Vuj;r!p$Caw^2BDJ@^r zC1K}O0`RG*nB1jMm~jE-1*WD8LkGDI0qE8Y~tHi?I^| zhhq~9hLe#(i)ChGvPZ;RlbC1HpOMm>r+&|-6i_^SHUlbIg<)e}fuo{`i{xSxQvsFX z4w=P*8?r!e`<897LV5#vZGJvkDMksw24dloibXueq*->>>xpdDDaqvrReT5^Cc%z1 z;n;?m6R1v{H%m!8fsZKosEUu_Nr8Qvw%>9;)Spj&eOtwMBsD&}$Tax} ztSp;%ecCYf(PDuo_M|qG=S)-D%4qp1%{Jt7Y0~e^8q|Bsx`ySJLy|`W*R@nMr8`y5 zcR_g#Nb#_bY^iDLUmC5c>A>cuWdouH++HuRcb!L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oard.class index 4b09bb65402dd24f0cfd33458b3c5225c21edf2f..f7ba4520ee5d7b545b75ff95dac0d51cdc8721f3 100644 GIT binary patch delta 17 ZcmeyW`BjtS)W2Q(7#J9AH*&lc0RT)k2Ydhk delta 17 ZcmeyW`BjtS)W2Q(7#J9AHgdcb0RT)f2YUbj 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 984b723de228b39a84169066dc321ebf4c79e9df..ff2127d863743b275b372464eff3463c4572bb64 100644 GIT binary patch delta 45 zcmV+|0Mh@o6|@xy%Ko~(0000zu?Uw50oaqE2~7d%lQ0MulLZPk0rQhQ3ONA-lXeO| Dd<_oL delta 45 zcmV+|0Mh@o6|@xy%Ko~(0000yu?Uw50ojwF2~7d&lQ0MulLZPk0rZnR3ONA;lXeO| Dd@K&t diff --git a/src/ch/zhaw/catan/Dummy.java b/src/ch/zhaw/catan/Dummy.java index fdcab53..e9eb5db 100644 --- a/src/ch/zhaw/catan/Dummy.java +++ b/src/ch/zhaw/catan/Dummy.java @@ -15,15 +15,14 @@ public class Dummy { SHOW, QUIT } - private void run() { TextIO textIO = TextIoFactory.getTextIO(); TextTerminal textTerminal = textIO.getTextTerminal(); SiedlerBoard board = new SiedlerBoard(); board.addField(new Point(2, 2), Land.FOREST); - board.setCorner(new Point(3, 3), "RR"); - board.setEdge(new Point(2, 0), new Point(3, 1), "r"); + board.setCorner(new Point(3, 3), new Settlement(Config.Faction.RED)); + board.setEdge(new Point(2, 0), new Point(3, 1), new Road(Config.Faction.BLUE)); board.addFieldAnnotation(new Point(2, 2), new Point(3, 1), "AA"); Map lowerFieldLabel = new HashMap<>(); diff --git a/src/ch/zhaw/catan/Road.java b/src/ch/zhaw/catan/Road.java index 92ac502..360e794 100644 --- a/src/ch/zhaw/catan/Road.java +++ b/src/ch/zhaw/catan/Road.java @@ -4,8 +4,10 @@ import java.util.HashMap; public class Road { private HashMap buildCost; + private Config.Faction faction; - public Road() { + public Road(Config.Faction faction) { + this.faction = faction; buildCost = new HashMap<>(); buildCost.put(Config.Resource.BRICK,1); buildCost.put(Config.Resource.LUMBER,1); diff --git a/src/ch/zhaw/catan/Settlement.java b/src/ch/zhaw/catan/Settlement.java index 289e9e8..6e11e5d 100644 --- a/src/ch/zhaw/catan/Settlement.java +++ b/src/ch/zhaw/catan/Settlement.java @@ -4,8 +4,10 @@ import java.util.HashMap; public class Settlement { private HashMap buildCost; + private Config.Faction faction; - public Settlement() { + public Settlement(Config.Faction faction) { + this.faction = faction; buildCost = new HashMap<>(); buildCost.put(Config.Resource.LUMBER,1); buildCost.put(Config.Resource.BRICK,1); diff --git a/src/ch/zhaw/catan/SiedlerBoard.java b/src/ch/zhaw/catan/SiedlerBoard.java index b073e13..502d852 100644 --- a/src/ch/zhaw/catan/SiedlerBoard.java +++ b/src/ch/zhaw/catan/SiedlerBoard.java @@ -8,7 +8,7 @@ import java.awt.*; import java.util.*; import java.util.List; -public class SiedlerBoard extends HexBoard { +public class SiedlerBoard extends HexBoard { Map lowerFieldLabel = new HashMap<>();