Add the code to allow foxes to have a gender
Explanation
I have looked at the code for a rabbit and copied the code relating to gender over into the fox class.
Firstly you need to add the is to the start of the class:
enum Genders
{
Male,
Female
}
private Genders Gender;
public bool IsFemale()
{
if (Gender == Genders.Female)
{
return true;
}
else
{
return false;
}
}
if (Rnd.Next(0, 100) < 50)
{
Gender = Genders.Male;
}
else
{
Gender = Genders.Female;
}
Console.Write("Gender " + Gender + " ");