示例#1
0
        private void InstructRover(char instruction)
        {
            Rover rover = CurrentRover();

            if (instruction == spinLeftCommand)
            {
                rover.SpinLeft();
            }
            else if (instruction == spinRightCommand)
            {
                rover.SpinRight();
            }
            else if (instruction == moveForwardCommand)
            {
                rover.MoveForward();
            }
        }