private void giveEnergyToPlants()
{
foreach (string organismID in _organismIDList)
{
OrganismState organismState = _newWorldState.GetOrganismState(organismID);
if (organismState != null && organismState.GetType() == typeof (PlantState))
{
PlantState plantState = (PlantState) organismState;
int availableLight = CurrentVector.State.GetAvailableLight(plantState);
if (plantState.IsAlive)
{
plantState.GiveEnergy(availableLight);
}
}
}
}