IEnumerable <Quardant> YouthWaysOn(Quardant quardant, CellsGroup group) { return(quardant.neighbours.Where(x => !x.ContainYouthOf(this, group.generation) && !x.ContainParentsOf(group) && !x.ContainPredecessorOf(group) )); }
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); }
public bool IsOlderThan(CellsGroup x) { return(SameDimension(x) && x.generation > this.generation); }
public bool IsPredecessorOf(CellsGroup x) { return(SameDimension(x) && this.generation == x.generation - 1); }
public bool IsParentOf(CellsGroup x) { return(SameDimension(x) && x.precursorId == this.id); }
public bool SameDimension(CellsGroup x) { return(x.tribe == this.tribe && x.pole == this.pole); }
public bool ContainPredecessorOf(CellsGroup group) { return(content.Exists(x => x.IsPredecessorOf(group))); }
public bool ContainOlderThan(CellsGroup group) { return(content.Exists(x => x.IsOlderThan(group))); }
public bool ContainParentsOf(CellsGroup group) { return(content.Exists(x => x.IsParentOf(group))); }