From e67c78e348d385cec49c076b18753605e0834d7e Mon Sep 17 00:00:00 2001 From: GabrielMagnus Date: Tue, 24 Mar 2020 22:03:33 +0100 Subject: [PATCH] Fikset markdown issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parprogrammering med Torbjørn --- .../inf112/fiasko/roborally/objects/RoboRallyGame.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java index d3c9e9e..386aadd 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java +++ b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java @@ -24,6 +24,8 @@ public class RoboRallyGame implements IDrawableGame { private List> conveyorBelts; private List> fastConveyorBelts; private List playerList; + private List> blacklistedTiles = new ArrayList<>(); + private List> whitelistedTiles = new ArrayList<>(); public RoboRallyGame(boolean debug) { if (debug) { @@ -306,10 +308,6 @@ public class RoboRallyGame implements IDrawableGame { } } - - private List> blacklistedTiles = new ArrayList<>(); - private List> whitelistedTiles = new ArrayList<>(); - /** * Finds conveyor belts that can move without conflict * @param conveyorBelts that should be checked @@ -328,6 +326,7 @@ public class RoboRallyGame implements IDrawableGame { } } + List> listOfRow = new ArrayList<>(); for (BoardElementContainer conveyorBeltWithRobot : conveyorBeltsWithRobotsOn) { if (blacklistedTiles.contains(conveyorBeltWithRobot) || whitelistedTiles.contains((conveyorBeltWithRobot))) { @@ -335,7 +334,7 @@ public class RoboRallyGame implements IDrawableGame { } BoardElementContainer lastInRow = findLastRobotInRow (conveyorBeltWithRobot, conveyorBeltsWithRobotsOn); - List> listOfRow = new ArrayList<>(); + List> results = findFirstRobotInRow(lastInRow, conveyorBeltsWithRobotsOn, listOfRow);