From 404260a23391f4d1ad8a1ac4b8405e93f4e93073 Mon Sep 17 00:00:00 2001 From: Jonas Wagner Date: Tue, 15 Feb 2022 12:05:19 +0100 Subject: [PATCH] Fix Gameboard in Gameloop --- src/main/java/Game.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/Game.java b/src/main/java/Game.java index 2b4b4b7..b9615d1 100644 --- a/src/main/java/Game.java +++ b/src/main/java/Game.java @@ -15,7 +15,7 @@ public class Game { for (Player p : g.players) { int c = 0; int dice; - System.out.println("Spieler " + p.name + " an der Reihe."); + System.out.println(g.printGameboard(g, p)); do { int figId; dice = p.rollDice(); @@ -28,6 +28,8 @@ public class Game { figId = p.choose(usableFigures); } while(figId == -1); g.setFigure(figId, dice, p, g); + clearScreen(); + System.out.println(g.printGameboard(g, p)); } } while (g.checkDice(dice, p, c)); if(p.checkGameWin(p.figures)) { @@ -35,6 +37,7 @@ public class Game { System.out.println("Spieler " + winner.name + " gewinnt!"); exit(42); } + clearScreen(); } } }