better naming description
This commit is contained in:
parent
f4fef1e9eb
commit
cbbc40c50a
|
@ -8,7 +8,7 @@ public interface RotableRiderRover {
|
|||
|
||||
void moveTowards(Direction direction);
|
||||
|
||||
void rotateTowards(MarsRover.Rotation rotation);
|
||||
void rotateTowards(Rotation rotation);
|
||||
|
||||
Coordinates getCurrentCoordinates();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package cat.hack3.codingtests.marsrover;
|
||||
|
||||
public interface MarsRoverCommand {
|
||||
public interface RoverCommand {
|
||||
void execute();
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package cat.hack3.codingtests.marsrover;
|
||||
|
||||
public class MoveBackwardsCommand implements MarsRoverCommand {
|
||||
public class MoveBackwardsCommand implements RoverCommand {
|
||||
private final RotableRiderRover rover;
|
||||
|
||||
public MoveBackwardsCommand(RotableRiderRover rover) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package cat.hack3.codingtests.marsrover;
|
||||
|
||||
public class MoveForwardCommand implements MarsRoverCommand{
|
||||
public class MoveForwardCommand implements RoverCommand {
|
||||
private final RotableRiderRover rover;
|
||||
|
||||
public MoveForwardCommand(RotableRiderRover rover) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package cat.hack3.codingtests.marsrover;
|
|||
|
||||
import static cat.hack3.codingtests.marsrover.RotableRiderRover.Rotation.LEFT;
|
||||
|
||||
public class TurnLeftCommand implements MarsRoverCommand{
|
||||
public class TurnLeftCommand implements RoverCommand {
|
||||
private final RotableRiderRover rover;
|
||||
|
||||
public TurnLeftCommand(RotableRiderRover rover) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package cat.hack3.codingtests.marsrover;
|
|||
|
||||
import static cat.hack3.codingtests.marsrover.RotableRiderRover.Rotation.RIGHT;
|
||||
|
||||
public class TurnRightCommand implements MarsRoverCommand{
|
||||
public class TurnRightCommand implements RoverCommand {
|
||||
private final RotableRiderRover rover;
|
||||
|
||||
public TurnRightCommand(RotableRiderRover rover) {
|
||||
|
|
|
@ -14,10 +14,10 @@ import static org.testng.Assert.assertEquals;
|
|||
public class MarsRoverTest {
|
||||
|
||||
private MarsRover rover;
|
||||
private MarsRoverCommand moveForwardCommand;
|
||||
private MarsRoverCommand moveBackwardsCommand;
|
||||
private MarsRoverCommand turnLeftCommand;
|
||||
private MarsRoverCommand turnRightCommand;
|
||||
private RoverCommand moveForwardCommand;
|
||||
private RoverCommand moveBackwardsCommand;
|
||||
private RoverCommand turnLeftCommand;
|
||||
private RoverCommand turnRightCommand;
|
||||
|
||||
@BeforeMethod
|
||||
public void setUp() {
|
||||
|
|
|
@ -9,10 +9,10 @@ import static cat.hack3.codingtests.marsrover.ui.console.UICommons.output;
|
|||
|
||||
public class RoverCommandsPerformer {
|
||||
private final Scanner reader;
|
||||
private final MarsRoverCommand moveForwardCommand;
|
||||
private final MarsRoverCommand moveBackwardsCommand;
|
||||
private final MarsRoverCommand turnLeftCommand;
|
||||
private final MarsRoverCommand turnRightCommand;
|
||||
private final RoverCommand moveForwardCommand;
|
||||
private final RoverCommand moveBackwardsCommand;
|
||||
private final RoverCommand turnLeftCommand;
|
||||
private final RoverCommand turnRightCommand;
|
||||
|
||||
public RoverCommandsPerformer(Scanner reader, RotableRiderRover rover) {
|
||||
this.reader = reader;
|
||||
|
|
Loading…
Reference in New Issue