Beispiel #1
0
        public bool Execute(char command, IRobotWars robot)
        {
            _validate = new ValidateCommand();
            if (robot == null || !_validate.IsValid(command))
                return false;
            this.ProcessCommand(command, robot);

            return true;
        }
Beispiel #2
0
        public bool Execute(char command, IRobotWars robot)
        {
            _validate = new ValidateCommand();
            if (robot == null || !_validate.IsValid(command))
            {
                return(false);
            }
            this.ProcessCommand(command, robot);

            return(true);
        }
Beispiel #3
0
 private bool Validate(string command)
 {
     command = command.Replace(" ", string.Empty);
     return(command.All(s => _validation.IsValid(s)));
 }