Skip to content

Commit

Permalink
new git init
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia Kulyk committed Sep 3, 2024
1 parent fa79add commit d4fe96f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/core/basesyntax/RobotRoute.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public void moveRobot(Robot robot, int toX, int toY) {
robot.turnLeft();
}
}
while (robot.getX() != toX){
while (robot.getX() != toX) {
robot.stepForward();
}

if(robot.getY() < toY) {
if (robot.getY() < toY) {
while (robot.getDirection() != Direction.UP){
robot.turnRight();
}
Expand Down

0 comments on commit d4fe96f

Please sign in to comment.