Battleships game for console and web.
One-sided game of battleships for playing against the computer. The program creates a 10x10 grid, and place a number of ships on the grid at random with the following sizes: 1 x Battleship (5 squares) 2 x Destroyers (4 squares)
It accepts input from the user in the format “A5” to signify a square to target, and feedback to the user whether the shot was success, miss, and additionally report on the sinking of any vessels.
. = no shot
- = miss
X = hit