From c02f609e8c1bb50dd3970d07dbdb08bd27963c0b Mon Sep 17 00:00:00 2001 From: Acid Date: Sun, 15 Dec 2024 16:11:40 +0100 Subject: [PATCH] getDirAection -- fix --- src/main/java/core/basesyntax/RobotRoute.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/core/basesyntax/RobotRoute.java b/src/main/java/core/basesyntax/RobotRoute.java index 9a766d79..af440857 100644 --- a/src/main/java/core/basesyntax/RobotRoute.java +++ b/src/main/java/core/basesyntax/RobotRoute.java @@ -7,7 +7,7 @@ public void moveRobot(Robot robot, int toX, int toY) { int startX = robot.getX(); int startY = robot.getY(); if (startX <= toX & startY <= toY) { - switch (robot.getDiraection()) { + switch (robot.getDirection()) { case LEFT: robot.turnRight(); while (robot.getY() != toY) { @@ -49,7 +49,7 @@ public void moveRobot(Robot robot, int toX, int toY) { } } if (startX >= toX & startY >= toY) { - switch (robot.getDiraection()) { + switch (robot.getDirection()) { case LEFT: while (robot.getX() != toX) { robot.stepForward(); @@ -91,7 +91,7 @@ public void moveRobot(Robot robot, int toX, int toY) { } } if (startX >= toX & startY <= toY) { - switch (robot.getDiraection()) { + switch (robot.getDirection()) { case LEFT: while (robot.getX() != toX) { robot.stepForward(); @@ -133,7 +133,7 @@ public void moveRobot(Robot robot, int toX, int toY) { } } if (startX <= toX & startY >= toY) { - switch (robot.getDiraection()) { + switch (robot.getDirection()) { case LEFT: robot.turnLeft(); while (robot.getY() != toY) {