Classic battleship board game made playable through HTML, CSS, and Javascript. Allows a player to select squares on a grid for placing ships and calling out shots. Option to play agains Computer AI.
HTML, CSS, JavaScript
Navigate to the page on your browser. Click the start button and begin placing ships. Instruction text on the top will let you know how many squares are left to pick to complete a ship. The ready button will pop up when you're finished placing your ships. Click any square on your opponent's board to call out a shot. Play until one player's ships are all sunk!
- As user, I want to be able to Start Game.
- As user, I want to select the squares to place my ships.
- As user, I press the Ready Button after placing my ships.
- As user, I can select the square on the opponent's grid to call a shot on.
- As user, I want to always see my board.
- As user, I need to know the result of my shot. ( Hit / Miss )
- As user, I need to know if a ship has sunk.
- Setup grid layout (Start small: 5x5)
- Ability to select a square
- Create a Ship object to record ship properties (length, squares, isSunk, etc.)
- Ability to select a number of squares equal to one ship's length
- Record selected squares into Ship object
- Scale up. Be able to select and create more ships
- Player ability to select square on opponent's board
- Add a function that simulates a computer calling a shot
- Display if one of Player's ships has been hit
- Display if a shot missed
- Display if the rest of a ship has been hit - ship has sunk
- Create a player object to record ships and wins
- Implementing ability to have a Player 2 as opponent
- Ability to change the sizes of the ships
- Ability to change the size of the board