public void Run() { System.Diagnostics.Stopwatch clock = new System.Diagnostics.Stopwatch(); clock.Start(); while (true) { RunActions(); pasture.Refresh(); Thread.Sleep(speed); } }
public void Run() { System.Diagnostics.Stopwatch clock = new System.Diagnostics.Stopwatch(); clock.Start(); while (!Organism.somethingExtinct()) // Stop if any organism goes extinct { RunActions(); pasture.Refresh(); Thread.Sleep(speed); } Console.WriteLine("Something went extinct!"); }