Beispiel #1
0
 public void Run()
 {
     while (_Running)
     {
         Random   r  = new Random(this.GetHashCode());
         int      rn = r.Next(_Decorators.Length);
         ISoldier s  = Factory.CreateSoldier();
         s = Decorate(s, _Decorators[rn]);
         ISimulation sim = Simulation.getInstance();
         ILivable    l   = new Livable(s, sim);
         sim.AddLivable(l);
         Thread.Sleep(Delay);
     }
 }