Task F235 – Eternal Life Bug – Status:Solved No comments yet
If only Growing older was post incremented…
Random GiveOrTake = new Random();
int LifeSpan = 75 + GiveOrTake.Next(-25, 25);
while (Age <= LifeSpan)
{
if (DateTime.Now.Month == BirthDate.Month &&
DateTime.Now.Day == BirthDate.Day)
{
//Fixed eternal life bug
//GrowOlder(Age++);
GrowOlder(++Age);
System.Threading.Thread.Sleep(86400000);
}
}
P.S. For all you coders out there just assume that GrowOlder() sets the global Age variable to whatever it receives as parameter => no aging.
