static void Main(string[] args) { Cage cage = new Cage("Wildness", 20); RabbitStore rabbit = new RabbitStore("Fluffy", "Blanc de Hotot"); Console.WriteLine(rabbit); }
public void Add(RabbitStore rabbit) { if (this.data.Count + 1 < -this.Capacity) { data.Add(rabbit); } }
public RabbitStore SellRabbit(string name) { RabbitStore rabbit = this.data .FirstOrDefault(n => n.Name == name); if (rabbit != null) { rabbit.Available = false; } return(rabbit); }
public bool RemoveRabbit(string name) { RabbitStore rabbit = this.data .FirstOrDefault(n => n.Name == name); if (rabbit != null) { this.data.Remove(rabbit); return(true); } return(false); }