internal void SetPlantToPosition(Plant plant) { _plantLandscape[plant.Location.Y, plant.Location.X] = plant; }
private void RemovePlantFromPlane(Plant plant) { _plantLandscape[plant.Location.Y, plant.Location.X] = null; }
private void AddPlantOnPlane(Plant plant) { var agentLocation = FindEmptySpot(_plantLandscape); plant.Location = agentLocation; _plantLandscape[agentLocation.Y, agentLocation.X] = plant; }
private void InitPlants() { for (int plantIndex = 0; plantIndex < MaxPlants; plantIndex++) { var newPlant = new Plant(); Plants[plantIndex] = newPlant; AddPlantOnPlane(newPlant); } }
/// <summary> /// Add a new plant to the SimObjects list /// </summary> /// <param name="plant">Plant object</param> public void AddPlant(Plant plant) => SimObjects.Add(plant);