Kortaggio/battleboat — pull request #5 by ChickenHatch (2014-10-03 17:03:53+00:00)
Title: Place ships individually and randomly in debug mode

This is a quick fix that allows the user to select ships to place, and
then place the rest of this ships randomly in debug mode. Before when
the ships were placed randomly it would not account for ships that were
already placed by the user.

I added an array that keeps track of which ships have been placed by
changing the value from 0 to 1.

Perhaps there is a better way, but since the whole program seems to be based upon the coordinates more than the ships, it seemed to me the best way was to simply track the ships.

In response to: https://github.com/Kortaggio/battleboat/issues/4