created Method throwDice in Siedler

This commit is contained in:
schrom01 2021-12-02 19:16:28 +01:00
parent 1362850570
commit 1c90d18510
1 changed files with 7 additions and 4 deletions

View File

@ -23,10 +23,7 @@ public class Siedler {
parser.displayGameboard(game.getBoard().getTextView());
parser.playerTurn(game.getCurrentPlayerFaction());
if(!diceThrown) {
Random random = new Random();
int thrownDices = random.nextInt(6) + random.nextInt(6);
parser.thrownDices(thrownDices);
//todo resourcen auszahlen
throwDice(game, parser);
diceThrown = true;
}
parser.displayPlayerResourceStock(game.getCurruntPlayerResource());
@ -70,6 +67,12 @@ public class Siedler {
}
private static void throwDice(SiedlerGame game, Parser parser) {
Random random = new Random();
int thrownDices = random.nextInt(6) + random.nextInt(6);
parser.thrownDices(thrownDices);
game.throwDice(thrownDices);
}
private static SiedlerGame foundingPhase(Parser parser) {