Beispiel #1
0
        public void Accept(GetRandom command)
        {
            if (!_conditions.Peek())
            {
                return;
            }

            _variables[command.TargetName] = _executorToolset.GetRandom(_variables[command.MaxValueName].Value);
        }
Beispiel #2
0
        public void Accept(GetRandom command)
        {
            if (!_variables.ContainsKey(command.TargetName) ||
                !_variables.ContainsKey(command.MaxValueName) ||
                _variables[command.MaxValueName] == null)
            {
                _isExecutable = false;
                return;
            }

            _variables[command.TargetName] = _executorToolset.GetRandom(_variables[command.MaxValueName].Value);
        }