universe.common.database.accrete
Class SimpleAccrete

java.lang.Object
  |
  +--universe.common.database.accrete.SimpleAccrete

public class SimpleAccrete
extends java.lang.Object


Nested Class Summary
static class SimpleAccrete.PlanetaryMakeup
          this is the class that holds the subset of the planetary data we wish to save.
static class SimpleAccrete.StarMakeup
          since this is not nescissarily specific to accrete, we may wish to not put this in the accrete package.
 
Field Summary
(package private)  int counter
           
(package private)  int[] dist
           
(package private)  java.util.Random random
           
(package private)  StarSystem ss
           
 
Constructor Summary
SimpleAccrete(float[] distribution, int numSystems)
           
 
Method Summary
 void createSystem()
           
 void createSystem(int stellarCode)
           
 int getCurrentSystemNumber()
           
private  SimpleAccrete.PlanetaryMakeup getPlanetaryMakeupFromPlanet(Planet p)
          This method extracts the information that the game wishes to keep about a planet and places it in a newly created PlanetaryMakeup object.
 SimpleAccrete.PlanetaryMakeup[] getPlanetaryMakeups()
           
private  Planet[] getPlanets(StarSystem ss)
          Get all planets, return in array.
private  Planet[] getPlanets(StarSystem ss, int max)
          Get no more than 'max' planets, randomly selected, from planets in system.
 SimpleAccrete.StarMakeup getStarMakeup()
           
private  SimpleAccrete.StarMakeup getStarMakeupFromSS(Star s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

random

java.util.Random random

ss

StarSystem ss

dist

int[] dist

counter

int counter
Constructor Detail

SimpleAccrete

public SimpleAccrete(float[] distribution,
                     int numSystems)
Method Detail

createSystem

public void createSystem()

createSystem

public void createSystem(int stellarCode)

getPlanetaryMakeups

public SimpleAccrete.PlanetaryMakeup[] getPlanetaryMakeups()

getStarMakeup

public SimpleAccrete.StarMakeup getStarMakeup()

getCurrentSystemNumber

public int getCurrentSystemNumber()

getPlanets

private Planet[] getPlanets(StarSystem ss)
Get all planets, return in array.


getPlanets

private Planet[] getPlanets(StarSystem ss,
                            int max)
Get no more than 'max' planets, randomly selected, from planets in system.


getPlanetaryMakeupFromPlanet

private SimpleAccrete.PlanetaryMakeup getPlanetaryMakeupFromPlanet(Planet p)
This method extracts the information that the game wishes to keep about a planet and places it in a newly created PlanetaryMakeup object.


getStarMakeupFromSS

private SimpleAccrete.StarMakeup getStarMakeupFromSS(Star s)


Copyright © 2001 Universe Dev Team All Rights Reserved.