I Wrote Your Battleship

OK, I finally had a little time to personally tackle the problem of creating ships and making sure that they didn't take up spaces that were already occupied. I didn't, however, tackle the issue of keeping track of shots made at a ship and telling when one has been sunk (although I have a few broad concepts of how to do that).

Doing this required rewriting the Ship class a little bit, so here I give you the three classes of Ship, ShipStuff, and ShipTest to download in a Zip archive:

Let's try this again: