|
@ -17,10 +17,11 @@ public class Game { |
|
|
dice = p.rollDice(); |
|
|
dice = p.rollDice(); |
|
|
c++; |
|
|
c++; |
|
|
if(p.checkFigureInBase(p.figures) == 4 && dice == 6) { |
|
|
if(p.checkFigureInBase(p.figures) == 4 && dice == 6) { |
|
|
//choose |
|
|
|
|
|
//moveToStart |
|
|
|
|
|
|
|
|
int figId = p.choose() - 1; |
|
|
|
|
|
//checkIfKicked |
|
|
|
|
|
p.figures.get(figId).setPosition(p.startPos); |
|
|
} else { |
|
|
} else { |
|
|
//choose |
|
|
|
|
|
|
|
|
int figId = p.choose() - 1; |
|
|
//moveToDice |
|
|
//moveToDice |
|
|
} |
|
|
} |
|
|
} while (g.checkDice(dice, p, c)); |
|
|
} while (g.checkDice(dice, p, c)); |
|
@ -34,10 +35,10 @@ public class Game { |
|
|
this.gb = new Gameboard(); |
|
|
this.gb = new Gameboard(); |
|
|
gb.initGameboard(); |
|
|
gb.initGameboard(); |
|
|
players = new ArrayList<>(); |
|
|
players = new ArrayList<>(); |
|
|
players.add(new Player("Rot", 40, 43)); |
|
|
|
|
|
players.add(new Player("Blau", 44, 47)); |
|
|
|
|
|
players.add(new Player("Gelb", 48, 51)); |
|
|
|
|
|
players.add(new Player("Grün", 52, 55)); |
|
|
|
|
|
|
|
|
players.add(new Player("Rot",0, 40, 43)); |
|
|
|
|
|
players.add(new Player("Blau",10, 44, 47)); |
|
|
|
|
|
players.add(new Player("Gelb",20, 48, 51)); |
|
|
|
|
|
players.add(new Player("Grün",30, 52, 55)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean checkDice(int dice, Player p, int countRolls) { |
|
|
public boolean checkDice(int dice, Player p, int countRolls) { |
|
|