public RemoveOrganism ( string organismID ) : void | ||
organismID | string | The ID of the organism that needs to be removed. |
return | void |
public void RemoveOrganism(string organismID)
{
if (IsImmutable)
{
throw new ApplicationException("WorldState must be mutable to change.");
}
// Clear the index if it's built
if (IndexBuilt)
{
var state = GetOrganismState(organismID);
FillCells(state, state.GridX, state.GridY, state.CellRadius, true);
}
_organisms.Remove(organismID);
}