Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SukhachovS committed Jan 23, 2024
1 parent 2aede41 commit d913e63
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/core/basesyntax/RobotRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ public void moveRobot(Robot robot, int toX, int toY) {

//Determine required directions
Direction horizontalDirection = deltaX > 0 ? Direction.RIGHT : Direction.LEFT;

Direction verticalDirection = deltaY > 0 ? Direction.UP : Direction.DOWN;


//rotate a robot till it faces a right X direction
while (currentDirection != horizontalDirection) {
robot.turnRight();
Expand Down

0 comments on commit d913e63

Please sign in to comment.