|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.DBItem | +--org.gjt.universe.Wormhole
A wormhole is a zero length conduit between two distant points in space through the lowest (zero-dimension) level of hyperspace. These end points may even be located in different galaxies. wormholes may only exist on the edge of a star system where the curvature of space is allows the envelope between normal and hyperspace to be pierced. Multiple wormholes make exist around the same star system, but must be a significant distance apart in order to prevent mutual collapse. While passing through a wormhole requires minimal movement on the part of a vessel, the travel time to and from each end of the wormhole combined with the careful navigation through each end point, is assumed to require the equivalent of 0.5 parsecs of movement (the size of this penalty may be adjusted by the active theme). All wormholes have a diameter which limits the maximum size of a vessel which may pass through it (based on the longest axis of the vessel due to hyperspace lensing effects). Multiple smaller vessels may pass through a worm-hole simultaneously provided the sum of their longest dimension does not exceed the diameter of the wormhole. A fleet whose combined diameter exceeds the diameter of the wormhole may pass through it in waves, but a movement penalty of 0.25 parsecs per wave is applied in order to reflect the maneuvering such a re-organization requires (the size of this penalty may be adjusted by the active theme). If the other end of the wormhole is at an enemy occupied star system, then the enemy may attack the incoming fleet as each wave arrives. Some wormholes are unstable and will erode by a small amount with each transit by a vessel. While random, the amount of erosion is generally proportional to the size of the ship passing through the wormhole. When completely eroded, the wormhole will collapse and disappear, stranding the destabilizing vessel on the other side. A civilization must posses the appropriate level of hyperspace sensor technology to determine whether or not a wormhole is stable, and, if unstable, the degree. Other highly advanced technology can destabilize a stable wormhole, and stabilize an unstable one. The frequency of wormhole occurance is normally very rare (controlled by game options), and each galaxy will normally only contain a small random number of wormholes at the start of a game. There will always be at least one wormhole joining one galaxy to another, as this is the only natural mechanism for intergalactic travel. Additional new wormholes may occur naturally during the game following a hyperspace storm. Likewise, some portion of previously stable wormholes may become unstable following such a storm.
WormholeOscillating
,
Serialized FormField Summary | |
private float |
diameter
|
private SystemID |
endPointID1
|
private SystemID |
endPointID2
|
private WormholeID |
id
|
private float |
integrity
|
private boolean |
isIntergalactic
|
private boolean |
isStable
|
private java.lang.String |
name
|
private static WormholeID |
ourNextID
|
Constructor Summary | |
|
Wormhole()
This constructor returns a wormhole with randomly determined attributes. |
(package private) |
Wormhole(boolean dummy)
Constructor for WormholeUndefined. |
|
Wormhole(SystemID ep1,
SystemID ep2,
boolean s)
This constructor returns a wormhole between the indicated star systems and having a random diameter of between 50 and 1000 meters and a random initial integrity of between 10 and 100. |
|
Wormhole(SystemID ep1,
SystemID ep2,
float d,
boolean s,
float i)
This constructer is the desginated initializer for instances of this class, all other constructors in this class and subclasses should call this method as their first instruction. |
Method Summary | |
private void |
analyzeEndPoints()
This method builds the name of this wormhole based on the current end-points and notes whether the wormhole is intergalactic or not. |
private void |
connectToSystemWithID(SystemID anID)
This method handles notifying the star system with the given ID that this wormhole has an end-point in it. |
private void |
disconnectFromSystemWithID(SystemID anID)
This method handles notifying the star system with the given ID that this wormhole no longer has an end-point in it. |
float |
getDiameter()
This method returns the diameter of the wormhole (in meters). |
SystemBase |
getEndPoint1()
This method returns the star system which is the first end-point of the wormhole. |
SystemBase |
getEndPoint2()
This method returns the star system which is the second end-point of the wormhole. |
SystemID |
getEndPointID1()
This method returns the ID of the star system which is the first end-point of the wormhole. |
SystemID |
getEndPointID2()
This method returns the ID of the star system which is the second end-point of the wormhole. |
WormholeID |
getID()
This method returns the unique ID of the receiving instance. |
Index |
getIndex()
This method provides a concrete implementation of the method inhernited from our abstract superclass. |
float |
getIntegrity()
This method returns the remaining integrity of the wormhole. |
boolean |
getIsStable()
This method returns true if the wormhole is stable, and false otherwise. |
java.lang.String |
getName()
This method returns the name of the wormhole by indicating the names of the star systems which are its end-points. |
boolean |
hasCollapsed()
This method returns true if the wormhole has collapsed and thus no longer allows transit. |
boolean |
isEndPoint(SystemID anID)
This method is provided to allow callers to easily test is a particualr star system is one of the end- points of the receiving wormhole instances. |
boolean |
isIntergalactic()
This method returns true if the end-points of the wormhole are in different galaxies. |
boolean |
isOscillating()
This method returns true if the wormhole is oscillating (i.e. |
void |
reduceIntegrity(float delta)
This method reduces the integrity of the wormhole by the given amount. |
void |
setDiameter(float newValue)
This method sets the diameter of the wormhole (in meters). |
void |
setEndPointID1(SystemID newValue)
This method sets the ID of the star system which is the first end-point of the wormhole. |
void |
setEndPointID2(SystemID newValue)
This method sets the ID of the star system which is the second end-point of the wormhole. |
void |
setIntegrity(float newValue)
This method sets the remaining integrity of the wormhole to the supplied value. |
void |
setIsStable(boolean newValue)
This method returns true if the wormhole is stable, and false otherwise. |
VectorDisplayReturn |
specificDisplayDebug()
This method is used for debugging purposes and returns a display vector describing this object. |
Methods inherited from class org.gjt.universe.DBItem |
getLocation, getOwner |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private WormholeID id
private SystemID endPointID1
private SystemID endPointID2
private float diameter
private boolean isStable
private float integrity
private boolean isIntergalactic
private java.lang.String name
private static WormholeID ourNextID
Constructor Detail |
public Wormhole(SystemID ep1, SystemID ep2, float d, boolean s, float i)
ep1
- The ID of the star system at one end point of the wormhole.ep2
- The ID of the star system at the other end point of the wormhole.d
- The diameter of the wormhole (in meters)s
- True if the wormhole is currently stable, false otherwise.i
- The initial integrity value of the wormholepublic Wormhole(SystemID ep1, SystemID ep2, boolean s)
ep1
- The ID of the star system at one end point of the wormhole.ep2
- The ID of the star system at the other end point of the wormhole.s
- True if the wormhole is stable and false otherwise.public Wormhole()
Wormhole(boolean dummy)
Method Detail |
private void connectToSystemWithID(SystemID anID)
setEndPointID1( SystemID aSystemID )
,
setEndPointID2( SystemID aSystemID )
private void disconnectFromSystemWithID(SystemID anID)
setEndPointID1( SystemID aSystemID )
,
setEndPointID2( SystemID aSystemID )
private void analyzeEndPoints()
getName()
,
isIntergalactic()
public WormholeID getID()
public Index getIndex()
getIndex
in class DBItem
public java.lang.String getName()
getName
in class DBItem
public boolean isIntergalactic()
public SystemID getEndPointID1()
public SystemID getEndPointID2()
public SystemBase getEndPoint1()
public SystemBase getEndPoint2()
public void setEndPointID1(SystemID newValue)
newValue
- The new end-point of the wormhole.public void setEndPointID2(SystemID newValue)
newValue
- The new end-point of the wormhole.public boolean isEndPoint(SystemID anID)
anID
- The ID of the star system being tested.public float getDiameter()
public void setDiameter(float newValue)
newValue
- The new value to be adopted.public boolean getIsStable()
public void setIsStable(boolean newValue)
newValue
- The new value to be adopted.public float getIntegrity()
public void setIntegrity(float newValue)
newValue
- The new value to be adopted.public void reduceIntegrity(float delta)
setIntegrity( float newValue )
public boolean hasCollapsed()
public boolean isOscillating()
WormholeOscillating
public VectorDisplayReturn specificDisplayDebug()
specificDisplayDebug
in class DBItem
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |