public bool Eat(Herd DeerHerd) { if (DeerHerd.GetCount() >= 12) { DeerHerd.Kill(0); return(true); } else { return(false); } }
public void Hunt(Herd DeerHerd) { List <int> DeadWolves = new List <int>(); for (int i = 0; i < Wolves.Count; i++) { if (Wolves[i].Eat(DeerHerd) == false) { DeadWolves.Add(i); } } for (int i = DeadWolves.Count - 1; i >= 0; i--) { Wolves.RemoveAt(DeadWolves[i]); } }