/battleships

Makers week 2: further OOP and TDD with Ruby

Primary LanguageRuby

Battleships project

This is a joint project between Joe and Gabe using GitHub pong Currently at MVP 2 - able to play one player game in irb.

Battleships (or Battleship) is a game where each player has a board upon which they can place a number of ships.

The boards are 10x10 two dimensional grid. After each player has placed their ships on their own board they take turns to shoot on the opponents board. In each round, each player takes a turn to announce a target square in the opponent's grid which is to be shot at. The opponent announces whether or not the square is occupied by a ship, and if it is a hit they mark this on their own primary grid. The attacking player notes the hit or miss on their own tracking grid, in order to build up a picture of the opponent's fleet.

When all of one player's ships have been sunk the game finishes and the player who has ships remaining is the winner.