Class: Astromapper::Builder::GasGiant
- Defined in:
- lib/astromapper/builder/orbit.rb
Instance Attribute Summary
Attributes inherited from Orbit
#au, #id, #kid, #orbit_number, #port, #xsize
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(star, orbit_number) ⇒ GasGiant
constructor
A new instance of GasGiant.
- #uwp ⇒ Object
Methods inherited from Planet
Methods inherited from Orbit
#biozone?, #distant?, #inner?, #km, #limit?, #outer?, #period, #populate, #populate_biozone, #populate_inner, #populate_outer, #radii, #to_ascii, #to_s
Methods inherited from Base
#config, constitute, #names, #spawn_command, #toss
Constructor Details
#initialize(star, orbit_number) ⇒ GasGiant
Returns a new instance of GasGiant.
154 155 156 157 158 159 160 161 |
# File 'lib/astromapper/builder/orbit.rb', line 154 def initialize(star,orbit_number) super @xsize = (toss(1,0) < 4) ? 'L' : 'S' moons = toss(2,0) moons = (moons - 4).whole if @xsize == 'S' @moons = make_moons(moons) @kid = 'G' end |
Instance Method Details
#uwp ⇒ Object
162 163 164 |
# File 'lib/astromapper/builder/orbit.rb', line 162 def uwp (@xsize == 'S') ? 'Small GG ' : 'Large GG ' end |