From 54c1a9d48513b2ab53846a20d9c7265b68bcb341 Mon Sep 17 00:00:00 2001 From: Tobydrama Date: Thu, 30 Apr 2020 14:37:03 +0200 Subject: [PATCH] made a board that is used for testing respawning --- .../java/inf112/fiasko/roborally/objects/BoardTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java b/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java index 0fd305e..b656d00 100644 --- a/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java +++ b/src/test/java/inf112/fiasko/roborally/objects/BoardTest.java @@ -234,7 +234,9 @@ public class BoardTest { public void flagGetsUpdatedOnRobotWithCorrectLastVisitedFlag() { Robot testRobot = robotList.get(6); assertEquals(0, testRobot.getLastFlagVisited()); - board.updateRobotFlag(RobotID.ROBOT_7, TileType.FLAG_1); + BoardElementContainer flag = new BoardElementContainer<>(new Tile(TileType.FLAG_1,Direction.NORTH) + ,new Position(1,1)); + board.updateRobotFlag(RobotID.ROBOT_7, flag); assertEquals(1, testRobot.getLastFlagVisited()); } @@ -242,7 +244,9 @@ public class BoardTest { public void flagDoesNotUpdatedOnRobotWithWrongLastVisitedFlag() { Robot testRobot = robotList.get(6); assertEquals(0, testRobot.getLastFlagVisited()); - board.updateRobotFlag(RobotID.ROBOT_7, TileType.FLAG_2); + BoardElementContainer flag = new BoardElementContainer<>(new Tile(TileType.FLAG_2,Direction.NORTH) + ,new Position(1,1)); + board.updateRobotFlag(RobotID.ROBOT_7, flag); assertEquals(0, testRobot.getLastFlagVisited()); }