Exemple #1
0
        public string Execute()
        {
            string result;

            switch (currentAction)
            {
            case EAction.MOVE:
            {
                bool response = sdkLibrary.Move(argument);
                result = String.Format("MOVE {0} >> {1}", argument, response);
            }
            break;

            case EAction.TURN:
            {
                bool response = sdkLibrary.Turn(argument);
                result = String.Format("TURN {0} >> {1}", argument, response);
            }
            break;

            case EAction.BEEP:
            {
                bool response = sdkLibrary.Beep();
                result = String.Format("BEEP >> {0}", response);
            }
            break;

            default:
                result = String.Format("WRONG COMMAND");
                break;
            }
            return(result);
        }
Exemple #2
0
        public static void Beep()
        {
            Action functionToCallLater = () => robot.Beep();

            Actions.Add(functionToCallLater);
        }
Exemple #3
0
 public void Execute(IRobot robot)
 {
     robot.Beep();
 }
Exemple #4
0
 public void Beep()
 {
     _robot.Beep();
     _traceWriter.WriteTrace(beepMessageTemplate);
     return;
 }