|
@ -14,32 +14,11 @@ public class Game { |
|
|
|
|
|
|
|
|
do { |
|
|
do { |
|
|
dice = p.rollDice(); |
|
|
dice = p.rollDice(); |
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
= Done rolldice() |
|
|
|
|
|
--> dice(1-6) |
|
|
|
|
|
= List<Integer> getUsableFigures (dice, g, p) |
|
|
|
|
|
--> {0,1,2,3} |
|
|
|
|
|
int choose(List<Integer> figs, p) |
|
|
|
|
|
--> 1 |
|
|
|
|
|
setFigure (p.figures.get(1), dice, g, p) |
|
|
|
|
|
--> nächster Spieler |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
c++; |
|
|
c++; |
|
|
//g.checkFieldClear(p.startPos, p, g) |
|
|
|
|
|
if(p.checkFigureInBase(p.figures) > 0 && dice == 6) { |
|
|
|
|
|
int figId = p.choose() - 1; |
|
|
|
|
|
//checkIfKicked |
|
|
|
|
|
|
|
|
ArrayList<Integer> usableFigures = g.getUsableFigures(dice, p, g); |
|
|
|
|
|
int figId = p.choose(usableFigures); |
|
|
|
|
|
|
|
|
p.figures.get(figId).setPosition(p.startPos); |
|
|
|
|
|
} else { |
|
|
|
|
|
int figId = p.choose() - 1; |
|
|
|
|
|
//moveToDice |
|
|
|
|
|
} |
|
|
|
|
|
} while (g.checkDice(dice, p, c)); |
|
|
} while (g.checkDice(dice, p, c)); |
|
|
|
|
|
|
|
|
p.checkGameWin(p.figures); |
|
|
p.checkGameWin(p.figures); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|