public Egg GetStrongestEgg() { Egg strongestEgg = this.data .OrderByDescending(x => x.Strength) .FirstOrDefault(); return(strongestEgg); }
public Egg GetEgg(string color) { Egg egg = this.data .OrderByDescending(x => x.Color == color) .FirstOrDefault(); return(egg); }
public bool RemoveEgg(string color) { if (this.data.Any(x => x.Color == color)) { Egg eggToRemove = this.data .Where(x => x.Color == color) .FirstOrDefault(); this.data.Remove(eggToRemove); return(true); } return(false); }