Oppdaterer Robot til å bruke en RobotID i stedet for en playerId int

This commit is contained in:
2020-02-22 23:37:03 +01:00
parent 37f6e44220
commit 9c5a2b60e7
2 changed files with 16 additions and 14 deletions

View File

@ -3,6 +3,7 @@ package inf112.fiasko.roborally.objects;
import inf112.fiasko.roborally.element_properties.Position;
import static org.junit.Assert.assertEquals;
import inf112.fiasko.roborally.element_properties.RobotID;
import org.junit.Before;
import org.junit.Test;
@ -12,7 +13,7 @@ public class RobotTest {
@Before
public void setUp(){
robotPosition = new Position(3,6);
testRobot = new Robot(6, robotPosition);
testRobot = new Robot(RobotID.ROBOT_6, robotPosition);
}
@Test
public void testRobotGetDamageOnInitializedRobot(){
@ -20,7 +21,7 @@ public class RobotTest {
}
@Test
public void testRobotGetPlayerId(){
assertEquals(6, testRobot.getPlayerId());
assertEquals(RobotID.ROBOT_6, testRobot.getRobotId());
}
@Test
public void testRobotGetBackupOnInitializedRobot(){