Merge remote-tracking branch 'origin/main'

This commit is contained in:
Speedy Gonzalez 2021-12-03 11:28:50 +01:00
commit 4fe4daf730
3 changed files with 29 additions and 1 deletions

View File

@ -5,4 +5,8 @@ public class City extends Settlement {
public City(Config.Faction faction) { public City(Config.Faction faction) {
super(faction); super(faction);
} }
public String toString() {
return super.getFaction().toString().toUpperCase();
}
} }

View File

@ -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;
}
}

View File

@ -419,10 +419,16 @@ public class SiedlerGame {
winPoints ++; winPoints ++;
} }
} }
//todo add points for longest road if(getLongestRoadFaction() == getCurrentPlayerFaction()){
winPoints = winPoints + 2;
}
return winPoints; return winPoints;
} }
private Faction getLongestRoadFaction() {
return null; //todo implement
}
/** /**
* Places the thief on the specified field and steals a random resource card (if * Places the thief on the specified field and steals a random resource card (if