Exemple #1
0
 public Molecule(Habitat habitat, InitMoleculeType type)
 {
     Init(habitat, type);
 }
Exemple #2
0
 public void Init(Habitat habitat, InitMoleculeType type)
 {
     this.habitat = habitat;
     if (type == InitMoleculeType.Center)
     {
         Position = new Position(0, 0, new V(0, 0), this);
         AttachedIteration = 0;
     }
     else
     {
         Position = Position.NextRandomPosition(
             habitat.CondensationCenter.Position.X,
             habitat.CondensationCenter.Position.Y,
             habitat.Radius,
             this.DefaultSpeed,
             this,
             type == InitMoleculeType.Additional);
     }
 }