A game of Battleships made with c#!
- choose the size of the board (1 - 5 grid)
- choose a number of ships (1 - size of the board)
- ships are randomly placed on the board with a random orientation
Ships are placed randomly on the board with random orientations. You as the captain can shoot any cell you wish on the grid. Upon shooting, you will either hit or miss. After this, the game will print the remaining number of enemy ships, regardless if it was a hit or miss. The game will also calculate all the possible placements of the ships on board, excluding the ships whose position is known. If you hit a ship 2 times, the game will inform you if the ship you shot is vertically or horizontally aligned.
Example of a Vertically aligned.
When there are no more unknown valid placements left, as in the player knows the locations of all the ships, the player will be informed.
The game will end when there are no more ships left.