Пример #1
0
 public SolarSystem(CelestialObject parent, string name) : base(parent, name)
 {
     _bodies = new List <CelestialBodyWithCore>();
 }
Пример #2
0
 protected CelestialBodyWithCore(CelestialObject parent, string name) : base(parent, name)
 {
     CoreSize = 0;
 }
Пример #3
0
 /// <summary>
 ///   Initializes a new celestial body.
 /// </summary>
 /// <param name="name">The name of the celestial body.</param>
 /// <param name="radius">The radius of the celestial body.</param>
 /// <param name="mass">The mass of the celestial body.</param>
 /// <param name="coreSize">The core size of the celestial body.</param>
 /// <exception cref="ArgumentOutOfRangeException">Thrown when a value is lower than 0%, or is greater or equal to 100%.</exception>
 protected CelestialBodyWithCore(CelestialObject parent, string name, double radius, double mass, double coreSize) :
     base(parent, name, radius, mass)
 {
     CoreSize = coreSize;
 }
Пример #4
0
 /// <summary>
 ///   Initializes a new planet.
 /// </summary>
 /// <param name="name">The name of the planet.</param>
 /// <param name="radius">The radius of the planet.</param>
 /// <param name="mass">The mass of the planet.</param>
 /// <param name="core">The size of the planet's core.</param>
 public Planet(CelestialObject parent, string name, double radius, double mass, int core) : base(parent, name,
                                                                                                 radius, mass,
                                                                                                 core)
 {
     _moons = new List <Moon>();
 }
Пример #5
0
 /// <inheritdoc cref="CelestialBody" />
 protected CelestialBodyWithCore(CelestialObject parent) : base(parent)
 {
     CoreSize = 0;
 }
Пример #6
0
 /// <summary>
 ///   Initializes a new planet with an unknown radius, mass and core size.
 /// </summary>
 /// <param name="name">The name of the planet.</param>
 public Planet(CelestialObject parent, string name) : base(parent, name)
 {
     _moons = new List <Moon>();
 }
Пример #7
0
 /// <summary>
 ///   Initializes a new planet with unknown properties.
 /// </summary>
 public Planet(CelestialObject parent) : base(parent)
 {
     _moons = new List <Moon>();
 }
Пример #8
0
 /// <summary>
 ///   Initializes a new celestial body with an unknown name, radius and mass.
 /// </summary>
 protected CelestialBody(CelestialObject parent) : base(parent)
 {
     Radius = 0;
     Mass   = 0;
 }
Пример #9
0
 /// <summary>
 ///   Initializes a new celestial body with an unknown radius and mass.
 /// </summary>
 /// <param name="name"> the new celestial body's name.</param>
 protected CelestialBody(CelestialObject parent, string name) : base(parent, name)
 {
     Radius = 0;
     Mass   = 0;
 }
Пример #10
0
 /// <summary>
 ///   Initializes a new celestial body.
 /// </summary>
 /// <param name="name"> the new celestial body's name.</param>
 /// <param name="radius"> the new celestial body's radius, in km.</param>
 /// <param name="mass"> the new celestial body's mass, in Earth Mass.</param>
 /// <exception cref="ArgumentOutOfRangeException">
 ///   Thrown when <c>radius</c> or <c>mass</c> is set to a value lesser than to
 ///   zero.
 /// </exception>
 protected CelestialBody(CelestialObject parent, string name, double radius, double mass) : base(parent, name)
 {
     Parent = parent;
     Radius = radius;
     Mass   = mass;
 }