namespace Mazes;
public static class EmptyMazeTask
{
public static void MoveOut(Robot robot, int width, int height)
{
MoveTo12(robot, width - 2, Right);
MoveTo12(robot, height - 2, Down);
}
public static void MoveTo12(Robot robot, int countSteps, way)
{
for (int i = 1; i < countSteps; i++)
robot.MoveTo(Direction.way);
}
}
需要Right和Down值来代替way
创造
Enum然后将其作为类型传递