change in Main Method
This commit is contained in:
parent
c387420ca8
commit
7d1a326dc0
|
@ -19,7 +19,7 @@ public class Siedler {
|
||||||
throwDice(game, parser);
|
throwDice(game, parser);
|
||||||
diceThrown = true;
|
diceThrown = true;
|
||||||
}
|
}
|
||||||
parser.displayPlayerInfo(game.getCurrentPlayerResource(),1);
|
parser.displayPlayerInfo(game.getCurrentPlayerResource(),game.getWinPoints().get(game.getCurrentPlayerFaction()));
|
||||||
switch (parser.getAction()) {
|
switch (parser.getAction()) {
|
||||||
case NEXTPLAYER:
|
case NEXTPLAYER:
|
||||||
Config.Faction winner = game.getWinner();
|
Config.Faction winner = game.getWinner();
|
||||||
|
@ -64,6 +64,7 @@ public class Siedler {
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
//sum of two integers from 0-5 + 2 --> sum of two integers from 1-6
|
//sum of two integers from 0-5 + 2 --> sum of two integers from 1-6
|
||||||
int thrownDices = random.nextInt(6) + random.nextInt(6) + 2;
|
int thrownDices = random.nextInt(6) + random.nextInt(6) + 2;
|
||||||
|
//todo check if 7
|
||||||
parser.thrownDices(thrownDices);
|
parser.thrownDices(thrownDices);
|
||||||
game.throwDice(thrownDices);
|
game.throwDice(thrownDices);
|
||||||
}
|
}
|
||||||
|
|
|
@ -323,7 +323,7 @@ public class SiedlerGame {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashMap<Faction, Integer> getWinPoints(){
|
public HashMap<Faction, Integer> getWinPoints(){
|
||||||
HashMap<Faction, Integer> winPoints = new HashMap<>();
|
HashMap<Faction, Integer> winPoints = new HashMap<>();
|
||||||
List<Structure> structures = board.getCorners();
|
List<Structure> structures = board.getCorners();
|
||||||
for(Structure structure : structures) {
|
for(Structure structure : structures) {
|
||||||
|
|
Loading…
Reference in New Issue