Browse Source

Refactor Method call

AIPlayer
FelixKrull 3 years ago
parent
commit
4139925d63
  1. 7
      src/main/java/Game.java

7
src/main/java/Game.java

@ -13,6 +13,7 @@ public class Game {
Player winner;
while(true){
for (Player p : g.players) {
System.out.println(g.toString());
int c = 0;
int dice;
System.out.println("Spieler " + p.name + " an der Reihe.");
@ -35,6 +36,7 @@ public class Game {
System.out.println("Spieler " + winner.name + " gewinnt!");
exit(42);
}
//clear;
}
}
}
@ -49,6 +51,11 @@ public class Game {
players.add(new Player("Grün",30, 52, 29));
}
@Override
public String toString() {
return gb.toString();
}
public boolean checkDice(int dice, Player p, int countRolls) {
int figuresInBase = p.checkFigureInBase(p.figures);
if(figuresInBase == 4) {

Loading…
Cancel
Save