Battleship

Battleship was created to enjoy a round or two of the classic game, Battleship, against a computer. The game allows the user to input coordinates to place ships and then subsequently fire upon specific coordinates. This will continue to happen until either the computer or the player have sunk both of their opponents ships.

In order to run the game, one can type 'ruby battleship_runner.rb' into the terminal within the specific Battleship directory. The terminal will prompt you throughout the game.

How to Play

Once the game is running, the user will be at the main menu. There will be a prompt to type 'p' to play or 'q' to quit. Pressing play will guide you through the game where pressing quit will exit the game.

Once the game starts running, the user will be prompted with entering three coordinates followed by two coordinates for the specific ships. If the coordinates are not valid, they will be asked to enter different coordinates. This process will place the ships. The computer will also have their ships placed randomly.

Turn by turn, the user will be asked to enter a coordinate for where they want to fire at. The computer will also randomly fire upon a cell. Both users will get feedback, and the user will be asked again for another coordinate. This process will continue until one of the two players ships BOTH of their opponents ships.

Once one side has both ships sunk, the terminal will let you know who wins and bring you back to the main menu, where the user may decide if they want to play again or exit the game.

Credits:

Sawaez Amin - https://github.com/sawaezamin Kevin Mugele - https://github.com/KevinMugele