From 290423cf38da682ba141b04bac75457300c24787 Mon Sep 17 00:00:00 2001 From: Tobydrama Date: Sun, 3 May 2020 15:08:39 +0200 Subject: [PATCH] =?UTF-8?q?la=20til=20mulighet=20til=20=C3=A5=20loade=20et?= =?UTF-8?q?=20manuellt=20test=20game?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fiasko/roborally/objects/RoboRallyGame.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java index de96418..621e0ee 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java +++ b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java @@ -34,6 +34,7 @@ public class RoboRallyGame implements DrawableGame, InteractableGame { private List program; private ProgrammingCardDeck playerHand; private ProgrammingCardDeck extraCards; + private Boolean testingMode; /** * Instantiates a new Robo Rally game @@ -44,7 +45,8 @@ public class RoboRallyGame implements DrawableGame, InteractableGame { * @param server The server if this player is host. Should be null otherwise */ public RoboRallyGame(List playerList, String boardName, String playerName, - RoboRallyServer server) { + RoboRallyServer server,Boolean testingMode) { + this.testingMode=testingMode; this.playerName = playerName; this.host = server != null; this.playerList = playerList; @@ -244,7 +246,13 @@ public class RoboRallyGame implements DrawableGame, InteractableGame { TileType.FLAG_4, TileType.WRENCH, TileType.WRENCH_AND_HAMMER); if (host) { - mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck(); + if(testingMode){ + mainDeck = DeckLoaderUtil.loadProgrammingCardsTestDeck(); + } + else{ + mainDeck = DeckLoaderUtil.loadProgrammingCardsDeck(); + } + } phase = new Phase(gameBoard, playerList, 600, this);