Example #1
0
 IEnumerable <Quardant> YouthWaysOn(Quardant quardant, CellsGroup group)
 {
     return(quardant.neighbours.Where(x => !x.ContainYouthOf(this, group.generation) &&
                                      !x.ContainParentsOf(group) &&
                                      !x.ContainPredecessorOf(group)
                                      ));
 }
Example #2
0
        public CellsGroup Propagate()
        {
            var n = new CellsGroup()
            {
                id           = tribe.GenId(),
                generation   = generation + 1,
                precursorId  = id,
                precursor    = this,
                pole         = pole,
                tribe        = tribe,
                propagation  = propagation,
                amount       = 0,
                quadrantFree = 0,
            };

            propagations.Add(n);
            tribe.groups.Add(n);

            return(n);
        }
Example #3
0
 public bool IsOlderThan(CellsGroup x)
 {
     return(SameDimension(x) &&
            x.generation > this.generation);
 }
Example #4
0
 public bool IsPredecessorOf(CellsGroup x)
 {
     return(SameDimension(x) &&
            this.generation == x.generation - 1);
 }
Example #5
0
 public bool IsParentOf(CellsGroup x)
 {
     return(SameDimension(x) &&
            x.precursorId == this.id);
 }
Example #6
0
 public bool SameDimension(CellsGroup x)
 {
     return(x.tribe == this.tribe &&
            x.pole == this.pole);
 }
Example #7
0
 public bool ContainPredecessorOf(CellsGroup group)
 {
     return(content.Exists(x => x.IsPredecessorOf(group)));
 }
Example #8
0
 public bool ContainOlderThan(CellsGroup group)
 {
     return(content.Exists(x => x.IsOlderThan(group)));
 }
Example #9
0
 public bool ContainParentsOf(CellsGroup group)
 {
     return(content.Exists(x => x.IsParentOf(group)));
 }