Set Variable citiesToUse in Constructor of Player
This commit is contained in:
parent
7752d6ff7e
commit
51e61a8e00
|
@ -19,6 +19,7 @@ public class Player {
|
||||||
this.faction = faction;
|
this.faction = faction;
|
||||||
roadsToUse = Config.Structure.ROAD.getStockPerPlayer();
|
roadsToUse = Config.Structure.ROAD.getStockPerPlayer();
|
||||||
settlementsToUse = Config.Structure.SETTLEMENT.getStockPerPlayer();
|
settlementsToUse = Config.Structure.SETTLEMENT.getStockPerPlayer();
|
||||||
|
citiesToUse = Config.Structure.CITY.getStockPerPlayer();
|
||||||
//Ressourcen initialisiern
|
//Ressourcen initialisiern
|
||||||
resources = new HashMap<>();
|
resources = new HashMap<>();
|
||||||
for(Config.Resource resource : Config.Resource.values()) {
|
for(Config.Resource resource : Config.Resource.values()) {
|
||||||
|
|
|
@ -278,7 +278,7 @@ public class SiedlerGame {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//2. Check if Settlement has already been built
|
//2. Check if Settlement has already been built
|
||||||
Settlement atCurrentPosition = board.getCorner(position);
|
Settlement atCurrentPosition = board.getCorner(position); //todo prüfen ob Siedlung von richtiger Faction und nicht Stadt
|
||||||
if (atCurrentPosition == null){
|
if (atCurrentPosition == null){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,8 @@ public class SiedlerGame {
|
||||||
}
|
}
|
||||||
//4.Insert City into the map.
|
//4.Insert City into the map.
|
||||||
board.setCorner(position,new City(allPlayers.get(activePlayer).getFaction()));
|
board.setCorner(position,new City(allPlayers.get(activePlayer).getFaction()));
|
||||||
return false;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue