|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.KeyedItem | +--org.gjt.universe.GameScale
Fields inherited from class org.gjt.universe.KeyedItem |
|
Constructor Summary | |
private |
GameScale(java.lang.String key)
This constructor is used to construct instances whose galaxy count, diameter, and possible galaxy type ranges are inherently defined and thus do not need to be passed explicitly. |
private |
GameScale(java.lang.String key,
int minGalaxyCount,
int maxGalaxyCount,
float minDiameter,
float maxDiameter,
float minDensity,
float maxDensity,
GalaxyType[] GalaxyTypes)
This constructor is used to construct instances whose galaxy count, diameter, and possible galaxy type ranges need to be explicitly specified as arguments. |
Method Summary | |
static GameScale |
FindByKey(java.lang.String aKey)
This class method returns the game scale instance matching the given key, or null if there isn't one. |
GalaxyType[] |
getGalaxyTypes()
This method returns the array of galaxy types that may be generated by this game scale. |
float |
getMaxDensity()
This method returns the maximum density to be used in randomly generated galaxies. |
float |
getMaxDiameter()
This method returns the maximum diameter to be used in randomly generated galaxies. |
int |
getMaxGalaxyCount()
This method returns the maximum number of galaxies to be randomly generated by this game scale. |
float |
getMinDensity()
This method returns the minimum density to be used in randomly generated galaxies. |
float |
getMinDiameter()
This method returns the minimum diameter to be used in randomly generated galaxies. |
int |
getMinGalaxyCount()
This method returns the minimum number of galaxies to be randomly generated by this game scale. |
void |
performLocalization()
This method overrides that of our abstract base class to set the description and back story of the receiving GalaxyType object. |
void |
setDensityRange(float minValue,
float maxValue)
This method sets the range of system densities to be used in randomly generated galaxies at this game scale. |
void |
setDiameterRange(float minValue,
float maxValue)
This method sets the range of diameters which will be used for randomly generated galaxies at this game scale. |
void |
setGalaxyCountRange(int minValue,
int maxValue)
This method sets the range of the number of galaxies that should be randomly generated at this game scale. |
void |
setGalaxyTypes(GalaxyType[] newValue)
This method sets the array of galaxy types that may be generated by this game scale. |
Methods inherited from class org.gjt.universe.KeyedItem |
FindByDescriptionAndSpace, FindByKeyAndSpace, getBackStory, getDescription, getKey, hashCode, setBackStory, setDescription, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
private int myMinGalaxyCount
private int myMaxGalaxyCount
private float myMinDiameter
private float myMaxDiameter
private float myMinDensity
private float myMaxDensity
private GalaxyType[] myGalaxyTypes
private static int MIN_GALAXY_COUNT
private static float MIN_DIAMETER
private static float MIN_DENSITY
private static final GalaxyType[] SMALL_GALAXY_TYPES
private static final GalaxyType[] MEDIUM_GALAXY_TYPES
private static final GalaxyType[] LARGE_GALAXY_TYPES
private static final GalaxyType[] HUGE_GALAXY_TYPES
private static final GalaxyType[] GLIESE_GALAXY_TYPES
private static final GalaxyType[] INTERGALACTIC_GALAXY_TYPES
public static final java.lang.String SMALL_KEY
public static final java.lang.String MEDIUM_KEY
public static final java.lang.String LARGE_KEY
public static final java.lang.String HUGE_KEY
public static final java.lang.String INTERGALACTIC_KEY
public static final java.lang.String SMALL_GLIESE_KEY
public static final java.lang.String MEDIUM_GLIESE_KEY
public static final java.lang.String LARGE_GLIESE_KEY
public static final java.lang.String HUGE_GLIESE_KEY
public static final java.lang.String CUSTOM_KEY
public static final GameScale SMALL
public static final GameScale MEDIUM
public static final GameScale LARGE
public static final GameScale HUGE
public static final GameScale INTERGALACTIC
public static final GameScale SMALL_GLIESE
public static final GameScale MEDIUM_GLIESE
public static final GameScale LARGE_GLIESE
public static final GameScale HUGE_GLIESE
public static final GameScale CUSTOM
public static GameScale[] ALL_SCALES
Constructor Detail |
private GameScale(java.lang.String key)
key
- The localization invariant unique key word used to uniquely identify a particular game scale (this is what is written to the game options file).FindByKey( String aKey )
private GameScale(java.lang.String key, int minGalaxyCount, int maxGalaxyCount, float minDiameter, float maxDiameter, float minDensity, float maxDensity, GalaxyType[] GalaxyTypes)
key
- The localization invariant unique key word used to uniquely identify a particular game scale (this is what is written to the game options file).minGalaxyCount
- The minimum number of galaxies which should be randomly generated. Values less than 1 will be treated as 1.maxGalaxyCount
- The maximum number of galaxies which should be randomly generated. Values less than 1 will be treated as 1.minDiameter
- The minimum diameter of randomly generated galaxies (in parsecs). Values less than 0.01 will be treated as 0.01.maxDiameter
- The maximum diameter of randomly generated galaxies (in parsecs). Values less than 0.01 will be treated as 0.01.minDensity
- The minimum density of randomly generated galaxies (in systems / cubic parsec). Values less than 0.001 will be treated as 0.001.maxDensity
- The maximum density of randomly generated galaxies (in systems / cubic parsec). Values less than 0.001 will be treated as 0.001.GalaxyTypes
- An array of key words identifying the possible types of galaxies which may be generated. Null values will be treated as allowing all random galaxy types.FindByKey( String aKey )
Method Detail |
public static GameScale FindByKey(java.lang.String aKey)
aKey
- The key word identifying the desired instance.public void setGalaxyCountRange(int minValue, int maxValue)
minValue
- The minimum number of galaxies which should be randomly generated.maxValue
- The maximum number of galaxies which should be randomly generated.public int getMinGalaxyCount()
setGalaxyCountRange( int low, int high )
,
getMaxGalaxyCount()
public int getMaxGalaxyCount()
setGalaxyCountRange( int low, int high )
,
getMinGalaxyCount()
public void setDiameterRange(float minValue, float maxValue)
minValue
- The minimum diameter of randomly generated galaxies (in parsecs).maxValue
- The maximum diameter of randomly generated galaxies (in parsecs).public float getMinDiameter()
setDiameterRange( float low, float high )
,
getMaxDiameter()
public float getMaxDiameter()
setDiameterRange( float low, float high )
,
getMinDiameter()
public void setDensityRange(float minValue, float maxValue)
minValue
- The minimum density of randomly generated galaxies (in systems / cubic parsec).maxValue
- The maximum density of randomly generated galaxies (in systems / cubic parsec).public float getMinDensity()
setDensityRange( float low, float high )
,
getMaxDensity()
public float getMaxDensity()
setDensityRange( float low, float high )
,
getMinDensity()
public void setGalaxyTypes(GalaxyType[] newValue)
newValue
- An array of galaxy type objects.getGalaxyTypes()
public GalaxyType[] getGalaxyTypes()
setGalaxyTypes( GalaxyType[] newValue )
public void performLocalization()
performLocalization
in class KeyedItem
KeyedItem.getDescription()
,
KeyedItem.getBackStory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |