User:Roadierch316/WikiWarGame

wikiwargame is an experiment in distributed programming. Basically, it is the exposed source code of a computer similar to the one featured in the film War Game =Objects available=

Missile
A basic missile, with global range. Can carry one of a number of warheads, which are all impact fuzed. Contains onboard navigation and targeting computers, and can be redirected within reason.

Methods

 * launch Launches the missle. Will return an error if the missile has not been readied.
 * returns true if launch is successful, otherwise false.
 * abort If the missile has been launched, destroy it.
 * returns true if missile is sucessfully aborted, otherwise false.
 * ready Open silo doors, fill fuel tank, release safties etc. Makes property warheadType read-only.
 * returns true if missile is ready, otherwise false
 * safe Close silo doors, empty fuel tank and so on, and re-enables write access to property warheadType. Will return an error if missile has been launched.
 * detonate Detonates the warhead. No return value.
 * returns true if missile is sucessfully safed, otherwise false.
 * setTarget Sets or changes the missile's on-board targetting computer to the coordinates contained in properties targetLat, targetLong and targetAlt. If the missile is in flight, will calculate whether the missile can hit the target before changing the loaded target.


 * Returns true if target is set/changedand can be hit, otherwise false.
 * toggleLock toggles write access to properties targetLat, targetLong and targetAlt.

Events

 * onLaunch Triggered when the missile is launched.
 * onTargetChange Triggered whenever the properties targetLat, targetLong or targetAlt are changed, or the method setTarget is called.
 * onApogee Triggered when missile reaches halfway point of flight.
 * onThreeQuarter Triggered when missile is past three quarter distance.

Properties
Read and writeable
 * targetLat, targetLong contain coordinates of the target, in degrees.* targetAlt Altitude of target.
 * warheadType Only writeable when missile is not ready.

Readable only
 * missileLat and missileLong Current coordinates of the missile, in degrees
 * missileAlt Altitude of missile, in meters.
 * missileFuel percentage fuel remaining
 * missileRange remaining range, calculated from missileFuel

=To Be Continued...=