As a consequence of changes made to address issue #32, support for touch buttons, this issue has been addressed. Moved missile firing into the update function on the ships, so that if a ship does not exist, no missiles can be fired.
I hesitated to do this at first, because now Missiles know about Ships and Ships know about missiles, collapsing a bit of the hierarchical structure we had earlier. But I didn't want to be too dogmatic -- maintaining the strict hierarchy seemed overly contrived. So I bit the bullet and allowed it. Now ships know that missiles exist and how to call their constructor, but nothing else. So it a fairly limited set of assumptions that ships are allowed to make about missiles.
Upshot is the problem has been fixed and so I am closing out this issue.
As a consequence of changes made to address issue #32, support for touch buttons, this issue has been addressed. Moved missile firing into the update function on the ships, so that if a ship does not exist, no missiles can be fired.
I hesitated to do this at first, because now Missiles know about Ships and Ships know about missiles, collapsing a bit of the hierarchical structure we had earlier. But I didn't want to be too dogmatic -- maintaining the strict hierarchy seemed overly contrived. So I bit the bullet and allowed it. Now ships know that missiles exist and how to call their constructor, but nothing else. So it a fairly limited set of assumptions that ships are allowed to make about missiles.
Upshot is the problem has been fixed and so I am closing out this issue.