public BioUnit(int x, int y, Data.Environment e)
 {
     this.posx   = x;
     this.posy   = y;
     this.color  = "#444444";
     this.parent = e;
 }
示例#2
0
        public async Task <Config> GetConfig(ConfigArgumentCommand request, EnvironmentRole environmentRole, CancellationToken cancellationToken)
        {
            Data.Environment env = await _environmentService.GetEnvironment(request, environmentRole, cancellationToken);

            Config result = await GetConfig(env.EnvironmentId, request, cancellationToken);

            request.ThrowNotFoundExceptionWhenValueIsNull(result);

            return(result);
        }
 public Carrot(int x, int y, Data.Environment e) : base(x, y, e)
 {
 }
示例#4
0
 public Carrot(int x, int y, Data.Environment e) : base(x, y, e)
 {
     this.color     = "#fa5511";
     this.living    = 0;
     this.livingTop = 3;
 }
示例#5
0
 protected void EnvInit()
 {
     Init();
     env = envs.FirstOrDefault(x => x.Name.ToLower().Equals(envName.ToLower()));
     guc = env ?? throw new ArgumentException($"environment '{envName}' is not found in config");
 }
示例#6
0
 /// <summary>
 /// If f is a symbol that refers to a primitive, and it's not shadowed in the local environment,
 /// returns an appropriate instance of Primitive for that argument count.
 /// </summary>
 public static Primitive FindGlobal(Val f, Data.Environment env, int nargs) =>
 (f.IsSymbol && Data.Environment.GetVariable(f.AsSymbol, env).IsNotValid) ?
 FindNary(f.AsSymbol.name, nargs) :
 null;
 public Rabbit(int x, int y, Data.Environment e) : base(x, y, e)
 {
 }
示例#8
0
 public Rabbit(int x, int y, Data.Environment e) : base(x, y, e)
 {
     this.color     = "#fafafa";
     this.living    = 0;
     this.livingTop = 3;
 }