示例#1
0
 public static void MoveTroughOneBend(Robot robot, int width, int height, int numberOfBends, int bendingNumber)
 {
     EmptyMazeTask.MoveDistanceTowards(robot, width - 3, Direction.Right);
     EmptyMazeTask.MoveDistanceTowards(robot, 2, Direction.Down);
     EmptyMazeTask.MoveDistanceTowards(robot, width - 3, Direction.Left);
     if (bendingNumber != numberOfBends - 1)
     {
         EmptyMazeTask.MoveDistanceTowards(robot, 2, Direction.Down);
     }
 }
示例#2
0
 public static void MoveTroughtDiagonal(Robot robot, int bigMove, Direction bigDir,
                                        Direction smallDir, int numberOfBending)
 {
     for (int i = 0; i < numberOfBending; i++)
     {
         EmptyMazeTask.MoveDistanceTowards(robot, bigMove, bigDir);
         if (i != numberOfBending - 1)
         {
             EmptyMazeTask.MoveDistanceTowards(robot, 1, smallDir);
         }
     }
 }