diff --git a/src/ch/zhaw/catan/City.java b/src/ch/zhaw/catan/City.java index 5e16c18..499bf87 100644 --- a/src/ch/zhaw/catan/City.java +++ b/src/ch/zhaw/catan/City.java @@ -5,4 +5,8 @@ public class City extends Settlement { public City(Config.Faction faction) { super(faction); } + + public String toString() { + return super.getFaction().toString().toUpperCase(); + } } diff --git a/src/ch/zhaw/catan/Field.java b/src/ch/zhaw/catan/Field.java new file mode 100644 index 0000000..38a4774 --- /dev/null +++ b/src/ch/zhaw/catan/Field.java @@ -0,0 +1,18 @@ +package ch.zhaw.catan; + +public class Field { + + private Config.Land land; + + public Field(Config.Land land){ + this.land = land; + } + + public Config.Resource getResource(){ + return land.getResource(); + } + + public Config.Land getLand() { + return land; + } +} diff --git a/src/ch/zhaw/catan/SiedlerGame.java b/src/ch/zhaw/catan/SiedlerGame.java index d926afb..1842179 100644 --- a/src/ch/zhaw/catan/SiedlerGame.java +++ b/src/ch/zhaw/catan/SiedlerGame.java @@ -419,10 +419,16 @@ public class SiedlerGame { winPoints ++; } } - //todo add points for longest road + if(getLongestRoadFaction() == getCurrentPlayerFaction()){ + winPoints = winPoints + 2; + } return winPoints; } + private Faction getLongestRoadFaction() { + return null; //todo implement + } + /** * Places the thief on the specified field and steals a random resource card (if