Developer's Diary
Software development, with Terry Ebdon
|
This is odd as the code looks OK, from a quick glance. (Ignore the hard-coded messages and keys, they're logged as separate issues.)
Despite the above test a warp factor of .2 is rejected:
This may be related to issue #6 - Minimum warp factor should be 0.125, not 0.25, though that issue is closed.
While docked the ship should be protected from all enemy attacks, but this is not always the case. The enemy fleet will attack under two conditions:
In scenario 1 the ship is protected, and this prevents the fleet from attacking. A check in Trek.enemyAttacksBeforeShipCanMove()
enables this protection.
In scenario 2 the battle computer initiates a fleet counter-attack without asking the ship if it is protected. This is a bug. A fix is required in Battle.enemyCounterAttacks().
16-MAR-2019 👈 Top of page 👉 08-MAY-2019
© 2020 Terry Ebdon.
Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.