Rover is preparing to move forward
This commit is contained in:
parent
8ff890376b
commit
6afb4b522b
|
@ -10,4 +10,8 @@ public class MarsRover {
|
|||
this.latitudeStartingPoint = latitudeStartingPoint;
|
||||
this.longitudeStartingPoint = longitudeStartingPoint;
|
||||
}
|
||||
|
||||
public void moveForward() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,20 +7,22 @@ import static cat.hack3.codingtests.marsrover.MarsMap.Direction.SOUTH;
|
|||
|
||||
public class MarsRoverTest {
|
||||
|
||||
public static final int MAP_WIDTH = 10;
|
||||
public static final int MAP_HEIGHT = 10;
|
||||
private MarsMap marsMap;
|
||||
private MarsRover rover;
|
||||
|
||||
@BeforeMethod
|
||||
public void setUp() {
|
||||
marsMap = new MarsMap(MAP_WIDTH, MAP_HEIGHT);
|
||||
int mapWidth = 10;
|
||||
int mapHeight = 10;
|
||||
marsMap = new MarsMap(mapWidth, mapHeight);
|
||||
|
||||
int latitudeStartingPoint = 2;
|
||||
int longitudeStartingPoint = 3;
|
||||
rover = new MarsRover(marsMap, latitudeStartingPoint, longitudeStartingPoint, SOUTH);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void havingARoverWithStartingPointAndDirection() {
|
||||
int latitudeStartingPoint = 2;
|
||||
int longitudeStartingPoint = 3;
|
||||
MarsMap.Direction startingDirection = SOUTH;
|
||||
new MarsRover(marsMap, latitudeStartingPoint, longitudeStartingPoint, startingDirection);
|
||||
public void roverMakeItsFirstStep() {
|
||||
rover.moveForward();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue