From 4139925d6327d14d7fc5f719970413cd58394c26 Mon Sep 17 00:00:00 2001 From: FelixKrull Date: Sun, 13 Feb 2022 22:31:29 +0100 Subject: [PATCH] Refactor Method call --- src/main/java/Game.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/Game.java b/src/main/java/Game.java index 504800c..80abd17 100644 --- a/src/main/java/Game.java +++ b/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) {