diff --git a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java index f38d121..0d6abcf 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java +++ b/src/main/java/inf112/fiasko/roborally/objects/RoboRallyGame.java @@ -296,9 +296,7 @@ public class RoboRallyGame implements IDrawableGame { List> conveyorBeltsWithRobotsThatShouldMove = conveyorBeltsThatCanMoveWithoutConflict(conveyorBelts); for (BoardElementContainer conveyorBelt : conveyorBeltsWithRobotsThatShouldMove) { - System.out.println(gameBoard.getTileOnPosition(conveyorBelt.getPosition()).getTileType().toString()); - System.out.println(conveyorBelt.getPosition().toString()); - System.out.println(gameBoard.getRobotOnPosition(conveyorBelt.getPosition())); + Direction currentDirection = conveyorBelt.getElement().getDirection(); RobotID robot = gameBoard.getRobotOnPosition(conveyorBelt.getPosition()); Position newPosition = gameBoard.getNewPosition(conveyorBelt.getPosition(), currentDirection); @@ -338,7 +336,7 @@ public class RoboRallyGame implements IDrawableGame { Tile nextTile = gameBoard.getTileOnPosition(newPosition); BoardElementContainer nextConveyorBelt = new BoardElementContainer<>(nextTile, newPosition); - BoardElementContainer lastInRow = findLastRobotInRow (nextConveyorBelt, conveyorBeltsWithRobotsOn); + BoardElementContainer lastInRow = findLastRobotInRow (conveyorBeltWithRobot, conveyorBeltsWithRobotsOn); List> listOfRow = new ArrayList<>(); List> results = findFirstRobotInRow(lastInRow, conveyorBeltsWithRobotsOn, listOfRow); @@ -406,8 +404,6 @@ public class RoboRallyGame implements IDrawableGame { } } - - private List> listOfConveyorBeltsWithRobotPointingAtTile(Boolean forward, BoardElementContainer currentTile, List> conveyorBeltsWithRobots) {