static void RobotMovedToDown(Robot robot, int Height) { for (int i = 0; i < Height; i++) { robot.MoveDown(); } }
public static void MoveOutFromDiagonalMaze(Robot robot, int width, int height) { int i = 0; if (width > height) { while (i < width + height - 7) { RobotMovedToRight(robot, (width - 2) / (height - 2)); i += (width - 2) / (height - 2); if (i >= width + height - 7) { break; } robot.MoveDown(); i++; } } else { while (i < width + height - 7) { RobotMovedToDown(robot, (height - 2) / (width - 2)); i += (height - 2) / (width - 2); if (i >= width + height - 7) { break; } robot.MoveRight(); i++; } } }
public static void MoveOutFromEmptyMaze(Robot robot, int width, int height) { for (int i = 0; i < width - 3; ++i) { robot.MoveTo(1, 1); } robot.MoveDown(); }