From 7da8ba7a9c4199960aca591598325342254320d8 Mon Sep 17 00:00:00 2001 From: GabrielMagnus Date: Thu, 23 Apr 2020 10:50:02 +0200 Subject: [PATCH] =?UTF-8?q?Lager=20test=20for=20at=20en=20vegg=20stopper?= =?UTF-8?q?=20en=20robot=20=C3=A5=20bli=20skubbet=20av=20brettet=20av=20et?= =?UTF-8?q?=20transportb=C3=A5nd?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: torlunjen --- .../inf112/fiasko/roborally/objects/PhaseTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java b/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java index 9b2bd43..36d8642 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/PhaseTest.java @@ -461,4 +461,17 @@ public class PhaseTest { assertFalse(board.isRobotAlive(RobotID.ROBOT_1)); assertNull(board.getRobotOnPosition(new Position(7, 0))); } + + @Test + public void robotOnConveyorBeltFacingOutOfMapMovesIntoWallIsBlocked() throws IOException, InterruptedException { + List robots = new ArrayList<>(); + List players = new ArrayList<>(); + robots.add(new Robot(RobotID.ROBOT_1, new Position(0, 0))); + players.add(new Player(RobotID.ROBOT_1, "Player 1")); + + Phase testPhase = createPhaseAndLoadBoard(players, robots); + testPhase.moveAllConveyorBelts(); + + assertNull(board.getRobotOnPosition(new Position(0, 0))); + } }