1
0
Fork 0

better naming description

This commit is contained in:
Xavier Fontanet 2024-06-22 19:21:31 +02:00
parent f4fef1e9eb
commit cbbc40c50a
8 changed files with 14 additions and 14 deletions

View File

@ -8,7 +8,7 @@ public interface RotableRiderRover {
void moveTowards(Direction direction);
void rotateTowards(MarsRover.Rotation rotation);
void rotateTowards(Rotation rotation);
Coordinates getCurrentCoordinates();

View File

@ -1,5 +1,5 @@
package cat.hack3.codingtests.marsrover;
public interface MarsRoverCommand {
public interface RoverCommand {
void execute();
}

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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) {

View File

@ -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() {

View File

@ -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;