From 0c861332586402977ac6bd1253fa9c83a2c264b3 Mon Sep 17 00:00:00 2001 From: Jonas Wagner Date: Tue, 8 Feb 2022 09:35:07 +0100 Subject: [PATCH] Refactor Game and GameTest --- src/main/java/Game.java | 7 ------- src/test/java/GameTest.java | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/main/java/Game.java b/src/main/java/Game.java index 6720ef5..20df95d 100644 --- a/src/main/java/Game.java +++ b/src/main/java/Game.java @@ -1,6 +1,4 @@ -import java.sql.SQLOutput; import java.util.ArrayList; -import java.util.Iterator; public class Game { @@ -53,17 +51,12 @@ public class Game { public int checkFieldClear(int posToCheck, Player p, Game g) { int mode; for (Player currentPlayer : g.players) { - //System.out.println("Player"); if (currentPlayer.name.equals(p.name)) { - System.out.println("TEST"); mode = 2; } else { - System.out.println("TEST2"); mode = 1; } for (Figure f : currentPlayer.figures) { - //System.out.println("Figure"); - System.out.println(f.getPosition()); if (posToCheck == f.getPosition()) { return mode; } diff --git a/src/test/java/GameTest.java b/src/test/java/GameTest.java index b01581d..b3e9297 100644 --- a/src/test/java/GameTest.java +++ b/src/test/java/GameTest.java @@ -15,14 +15,12 @@ public class GameTest { private Game g; private Player p1; - private Player p2; @BeforeEach void setup() { g = new Game(); p1 = new Player("Rot", 1, 40, 43); - p2 = new Player("Blau",10, 44, 47); } @ParameterizedTest