private void registerCelestialBody(CelestialBody CB) { AllBodies.AddLast(CB); if (!BodyDictionary.ContainsKey(CB.Name)) { BodyDictionary.Add(CB.Name, CB); } }
public static CelestialBody FindBody([NotNull] string name) { return(AllBodies.SingleOrDefault(body => body.bodyName == name)); }