Here are the ship properties that we've defined for our game and their descriptions. This table of properties is the same for all ships we will construct, whether randomly or manually:
name |
A string value. |
registry |
A string value. |
shields |
A number of shield strength, initialized at 100. This will decrement as the ship sustains damage. |
torpedos |
A number that indicates the number of torpedoes the ship has. This will decrement by 1 each time we fire a torpedo in our game. |
hull |
Starting from 0, a number that indicates how much hull damage the ship has sustained after the shields are depleted. When this reaches 100, the ship is destroyed. Hopefully, everyone got to the escape pods! |
speed |
From warp 1 to 9.99, our ship has a variable speed. |
phasers |
No ship would be complete without phasers for battle! Define a random number from 1 to 100 to specify how much damage is done by the ship's phasers. |
x, y, and z |
The coordinates... |