change in Main Method

This commit is contained in:
schrom01 2021-12-03 08:54:27 +01:00
parent c387420ca8
commit 7d1a326dc0
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,7 @@ public class Siedler {
throwDice(game, parser);
diceThrown = true;
}
parser.displayPlayerInfo(game.getCurrentPlayerResource(),1);
parser.displayPlayerInfo(game.getCurrentPlayerResource(),game.getWinPoints().get(game.getCurrentPlayerFaction()));
switch (parser.getAction()) {
case NEXTPLAYER:
Config.Faction winner = game.getWinner();
@ -64,6 +64,7 @@ public class Siedler {
Random random = new Random();
//sum of two integers from 0-5 + 2 --> sum of two integers from 1-6
int thrownDices = random.nextInt(6) + random.nextInt(6) + 2;
//todo check if 7
parser.thrownDices(thrownDices);
game.throwDice(thrownDices);
}

View File

@ -323,7 +323,7 @@ public class SiedlerGame {
return null;
}
private HashMap<Faction, Integer> getWinPoints(){
public HashMap<Faction, Integer> getWinPoints(){
HashMap<Faction, Integer> winPoints = new HashMap<>();
List<Structure> structures = board.getCorners();
for(Structure structure : structures) {