public PlanetView(string stellarName, string planetName, double orbDistance, PlanetaryZone pCode) { _stellarName = stellarName; _planetName = planetName; _orbDistance = orbDistance; _code = PlanetReference.convertPlanetCode(pCode); }
public static string convertPlanetCode(PlanetaryZone c) { switch (c) { case PlanetaryZone.UnknownZone: return "Unknown Zone"; case PlanetaryZone.BlackZone: return "Black Zone"; case PlanetaryZone.YellowZone: return "Yellow Zone"; case PlanetaryZone.GreenZone: return "Green Zone"; case PlanetaryZone.BlueZone: return "Blue Zone"; case PlanetaryZone.NoZone: return "ERROR. DANGER WILL ROBINSON"; default: return "!?!?!?!?!?"; } }
/// <summary> /// Copy constructor /// </summary> /// <param name="p">Planet being copied</param> public Planet(Planet p) { this.parentPtr = p.parentPtr; this.locCode = p.locCode; this.orbitalRadius = p.orbitalRadius; }
/// <summary> /// Constructor placing an unset planet (orbit) in place. /// </summary> /// <param name="parent">The parent object. This is a pointer to it.</param> /// <param name="loc">The zone this orbit is in.</param> /// <param name="radius">The orbital radius.</param> public Planet(AstronomicalObject parent, PlanetaryZone loc, double radius) { this.parentPtr = parent; this.locCode = loc; this.orbitalRadius = radius; }
/// <summary> /// Base constructor /// </summary> public Planet() { this.parentPtr = null; this.locCode = PlanetaryZone.UnknownZone; this.orbitalRadius = 0; }