mirror of
				https://github.com/inf112-v20/Fiasko.git
				synced 2025-11-03 19:23:45 +01:00 
			
		
		
		
	Lager test for at en vegg stopper en robot å bli skubbet av brettet av et transportbånd
Co-Authored-By: torlunjen <torlunjen@users.noreply.github.com>
This commit is contained in:
		@@ -461,4 +461,17 @@ public class PhaseTest {
 | 
				
			|||||||
        assertFalse(board.isRobotAlive(RobotID.ROBOT_1));
 | 
					        assertFalse(board.isRobotAlive(RobotID.ROBOT_1));
 | 
				
			||||||
        assertNull(board.getRobotOnPosition(new Position(7, 0)));
 | 
					        assertNull(board.getRobotOnPosition(new Position(7, 0)));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Test
 | 
				
			||||||
 | 
					    public void robotOnConveyorBeltFacingOutOfMapMovesIntoWallIsBlocked() throws IOException, InterruptedException {
 | 
				
			||||||
 | 
					        List<Robot> robots = new ArrayList<>();
 | 
				
			||||||
 | 
					        List<Player> 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)));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user