created Method throwDice in Siedler
This commit is contained in:
parent
1362850570
commit
1c90d18510
|
@ -23,10 +23,7 @@ public class Siedler {
|
||||||
parser.displayGameboard(game.getBoard().getTextView());
|
parser.displayGameboard(game.getBoard().getTextView());
|
||||||
parser.playerTurn(game.getCurrentPlayerFaction());
|
parser.playerTurn(game.getCurrentPlayerFaction());
|
||||||
if(!diceThrown) {
|
if(!diceThrown) {
|
||||||
Random random = new Random();
|
throwDice(game, parser);
|
||||||
int thrownDices = random.nextInt(6) + random.nextInt(6);
|
|
||||||
parser.thrownDices(thrownDices);
|
|
||||||
//todo resourcen auszahlen
|
|
||||||
diceThrown = true;
|
diceThrown = true;
|
||||||
}
|
}
|
||||||
parser.displayPlayerResourceStock(game.getCurruntPlayerResource());
|
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) {
|
private static SiedlerGame foundingPhase(Parser parser) {
|
||||||
|
|
Loading…
Reference in New Issue