Beispiel #1
0
 /// <summary>
 /// Advances the virtual time at the zoo by <see cref="TimeIncrements"/> and decreases
 /// all animals health by a random amount, the range of which can be controlled by a <paramref name="randCallBack"/>.
 /// </summary>
 /// <param name="randCallBack">An optional callback where callers can control the parameters of the health decrease. Defaults to a random values between 0 and 20</param>
 public void AdvanceTime(Func <Random, int> randCallBack = null)
 {
     CheckConfigured();
     TimeOfDay = TimeOfDay.AddSeconds(TimeIncrements);
     DecreaseAllAnimalHealth(randCallBack);
     StatusChanged?.Invoke(this, null);
 }