internal ConstructingJob(Construct parent)
            {
                parent_ = parent;

                HashSet<MapField> set = new HashSet<MapField>();
                foreach ( MapField neighvour in parent_.Location.SelectMany(field => field.Neighbour.Where(neighvour => !parent_.Location.Contains(neighvour))) ) {
                    set.Add(neighvour);
                }

                neighboursSet_ = set;
            }
 internal MapFieldList(Construct c)
 {
     parent_ = c;
 }
 internal ConstructingJob(Construct parent)
 {
     parent_ = parent;
 }
Exemplo n.º 4
0
 public void AddConstruct(Construct construct)
 {
     constructs_.Add(construct);
     float priority = construct.BuildJob.Location.All(field => !field.IsAvaliable) ? 3f : 0.5f;
     JobQueue.Enqueue(construct.BuildJob, priority);
 }