Merge remote-tracking branch 'origin/main' into main

# Conflicts:
#	src/ch/zhaw/catan/SiedlerGame.java
This commit is contained in:
Andrin Fassbind 2021-12-04 14:06:19 +01:00
commit 260d7bf2f0
1 changed files with 17 additions and 1 deletions

View File

@ -216,6 +216,22 @@ public class SiedlerGame {
return returnMap;
}
private void handleDiceThrow7() {
for(Player player : allPlayers) {
HashMap<Resource, Integer> resources = player.getResources();
int countResources = 0;
for(Resource resource : resources.keySet()){
countResources += resources.get(resource);
}
if(countResources > 7){
int newCountResources = countResources / 2;
ArrayList<Resource> resourceArrayList = new ArrayList<>();
//for(Resource resource : ) todo complete
}
}
}
/**
* Builds a settlement at the specified position on the board.
*
@ -450,7 +466,7 @@ public class SiedlerGame {
}
}
if(getLongestRoadFaction() == getCurrentPlayerFaction()){
winPoints = winPoints + 2;
winPoints += 2;
}
return winPoints;
}