diff --git a/src/ch/zhaw/catan/Siedler.java b/src/ch/zhaw/catan/Siedler.java index f5dd522..f46161f 100644 --- a/src/ch/zhaw/catan/Siedler.java +++ b/src/ch/zhaw/catan/Siedler.java @@ -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) {