private void AddNewCreatures() { foreach (var newSimObject in NewSimObjects) { SimObjects.Add(newSimObject); } NewSimObjects.Clear(); }
public void AddObstacle(int xPos, int yPos) { SimObjects.Add(new Obstacle(xPos, yPos, this)); }
/// <summary> /// Add a new obstacle to the SimObjects list /// </summary> /// <param name="obstacle">Obstacle object</param> public void AddObstacle(Obstacle obstacle) => SimObjects.Add(obstacle);
public void AddPlant(int energy, int xPos, int yPos) { SimObjects.Add(new Plant(energy, xPos, yPos, this)); }
/// <summary> /// Add a new plant to the SimObjects list /// </summary> /// <param name="plant">Plant object</param> public void AddPlant(Plant plant) => SimObjects.Add(plant);
/// <summary> /// Add a new creature to the SimObjects list /// </summary> /// <param name="creature">Creature object</param> public void AddCreature(Creature creature) => SimObjects.Add(creature);