Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Mazes
- {
- public static class EmptyMazeTask
- {
- public static void MoveOut(Robot robot, int width, int height)
- {
- int x = 1;
- int y = 1;
- go_bottom(y, height, robot);
- go_right(x, width, robot);
- }
- static void go_bottom(int y, int height, Robot bot)
- {
- while(y != height - 2)
- {
- bot.MoveTo(Direction.Down);
- y++;
- }
- }
- static void go_right(int x, int width, Robot bot)
- {
- while(x != width - 2)
- {
- bot.MoveTo(Direction.Right);
- x++;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement