예제 #1
0
        public void ExecuteCommand(string command, IRobot robot)
        {
            switch (command.ToUpper())
            {
            case "L":
                robot.ChangeFacing(true);
                break;

            case "R":
                robot.ChangeFacing(false);
                break;

            case "F":
                robot.MoveForward();
                break;
            }
        }