コード例 #1
0
ファイル: Cell.cs プロジェクト: caillou15/Cell-Lab-Remake
 public Cell(CellMode mode, Simulation container)
 {
     Mode      = mode;
     Mass      = 500;
     Alive     = true;
     Container = container;
 }
コード例 #2
0
        public Cell NewCell(CellMode mode, PointF location)
        {
            Cell c = mode.CreateCell(this);

            c.Location = location;
            cells.Add(c);
            return(c);
        }
コード例 #3
0
ファイル: Genome.cs プロジェクト: caillou15/Cell-Lab-Remake
        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);
        }
コード例 #4
0
ファイル: Genome.cs プロジェクト: caillou15/Cell-Lab-Remake
 /// <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;
 }
コード例 #5
0
ファイル: Genome.cs プロジェクト: caillou15/Cell-Lab-Remake
 public Genome()
 {
     modes       = new List <CellMode>();
     InitialMode = null;
 }
コード例 #6
0
 public Photocyte(CellMode mode, Simulation container) : base(mode, container)
 {
 }