public Cell(CellMode mode, Simulation container) { Mode = mode; Mass = 500; Alive = true; Container = container; }
public Cell NewCell(CellMode mode, PointF location) { Cell c = mode.CreateCell(this); c.Location = location; cells.Add(c); return(c); }
public object Clone() { Genome other = new Genome(); foreach (CellMode mode in modes) { CellMode clone = new CellMode(mode); other.modes.Add(clone); } for (int i = 0; i < modes.Count; i++) { CellMode local = modes[i]; CellMode remote = other.modes[i]; remote.Child1 = other.modes[modes.IndexOf(local.Child1)]; remote.Child2 = other.modes[modes.IndexOf(local.Child2)]; } return(other); }
/// <summary> /// Copies the value parameters from other to the new mode. /// Does not copy child references. /// </summary> /// <param name="other">the mode to copy from</param> internal CellMode(CellMode other) { Type = other.Type; SplitMass = other.SplitMass; }
public Genome() { modes = new List <CellMode>(); InitialMode = null; }
public Photocyte(CellMode mode, Simulation container) : base(mode, container) { }