public GameCell(GameCell c) { RabbitsGenerations = new List<Generation<Rabbit>>(); foreach (Generation<Rabbit> g in c.RabbitsGenerations) RabbitsGenerations.Add(new Generation<Rabbit>(g)); FoxesGenerations = new List<Generation<Fox>>(); foreach (Generation<Fox> g in c.FoxesGenerations) FoxesGenerations.Add(new Generation<Fox>(g)); VegetationLevel = c.VegetationLevel; RabbitsCount = c.RabbitsCount; FoxesCount = c.FoxesCount; }
public GameCell(GameCell c) { RabbitsGenerations = new List <Generation <Rabbit> >(); foreach (Generation <Rabbit> g in c.RabbitsGenerations) { RabbitsGenerations.Add(new Generation <Rabbit>(g)); } FoxesGenerations = new List <Generation <Fox> >(); foreach (Generation <Fox> g in c.FoxesGenerations) { FoxesGenerations.Add(new Generation <Fox>(g)); } VegetationLevel = c.VegetationLevel; RabbitsCount = c.RabbitsCount; FoxesCount = c.FoxesCount; }
public void OneCell() { initAll(); GameCell c = new GameCell(20, 100, 1f); c.oneDayCourse(365 * 5); //Assert.Inconclusive(c.RabbitsCount + " " + c.FoxesCount); }
/// <summary> /// Copy a Cell but Merges the current Contents with the new Ones /// </summary> /// <param name="c">The Cell to Copy From</param> public void CopyMerge(GameCell c) { Merge(c.FoxesGenerations); Merge(c.RabbitsGenerations); VegetationLevel = c.VegetationLevel; RabbitsCount = c.RabbitsCount; FoxesCount = c.FoxesCount; }