Go to file
2022-10-03 18:06:46 -04:00
.vscode initial commit 2022-08-12 10:23:23 -04:00
css Both Board Have Random Selection -Stiil working on ai 2022-08-13 18:42:08 -04:00
img Both Board Have Random Selection -Stiil working on ai 2022-08-13 18:42:08 -04:00
script Both Board Have Random Selection -Stiil working on ai 2022-08-13 18:42:08 -04:00
index.html Both Board Have Random Selection -Stiil working on ai 2022-08-13 18:42:08 -04:00
README.md Update README.md 2022-10-03 18:06:46 -04:00

Battleship

The game

Long version: see wikipedia

  • Each player starts with a fleet of 5 ships, of length 5, 4, 3, 3, and 2.
  • Each player places their ships horizontally or vertically on a 10x10 grid; this is not visible to their opponent.
  • Players take turns to fire at positions on the grid, gradually revealing where their opponents ships are and are not located.
  • A ship is destroyed when every cell of a ship has been hit.
  • The winner is the first player to destroy their opponents fleet.

You lose if:

  • You do not place the correct number and size of ships.
  • You place your fleet in impossible positions (ships overlapping or partly off the board).
  • Your code raises an exception.
  • All your ships have been sunk.

TECHNOLOGIES

  • HTML
  • Javascript
  • CSS

SCREENSHOTS

image

image

HOW TO PLAY

Use player random button to place tour ships on the board, when you finish hit the start button.

There is a Do Not Cheat button that shows enemy ships. again "DO NOT CHEATE"

Deployed Link: Link)