/// <summary> /// Clones the current plant state while resetting the immutability attribute /// so that the new state can be updated with new information. /// </summary> /// <returns>An newly mutable OrganismState that can be casted to a PlantState.</returns> /// <internal/> public override OrganismState CloneMutable() { var newInstance = new PlantState(ID, Species, Generation, EnergyState, Radius); CopyStateInto(newInstance); return(newInstance); }
/// <summary> /// Clones the current plant state while resetting the immutability attribute /// so that the new state can be updated with new information. /// </summary> /// <returns>An newly mutable OrganismState that can be casted to a PlantState.</returns> /// <internal/> public override OrganismState CloneMutable() { var newInstance = new PlantState(ID, Species, Generation, EnergyState, Radius); CopyStateInto(newInstance); return newInstance; }