|
@ -15,7 +15,7 @@ public class Game { |
|
|
for (Player p : g.players) { |
|
|
for (Player p : g.players) { |
|
|
int c = 0; |
|
|
int c = 0; |
|
|
int dice; |
|
|
int dice; |
|
|
System.out.println("Spieler " + p.toString() + " an der Reihe."); |
|
|
|
|
|
|
|
|
System.out.println("Spieler " + p.name + " an der Reihe."); |
|
|
do { |
|
|
do { |
|
|
int figId; |
|
|
int figId; |
|
|
dice = p.rollDice(); |
|
|
dice = p.rollDice(); |
|
@ -32,7 +32,7 @@ public class Game { |
|
|
} while (g.checkDice(dice, p, c)); |
|
|
} while (g.checkDice(dice, p, c)); |
|
|
if(p.checkGameWin(p.figures)) { |
|
|
if(p.checkGameWin(p.figures)) { |
|
|
winner = p; |
|
|
winner = p; |
|
|
System.out.println("Spieler " + winner.toString() + " gewinnt!"); |
|
|
|
|
|
|
|
|
System.out.println("Spieler " + winner.name + " gewinnt!"); |
|
|
exit(42); |
|
|
exit(42); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|