This is a simple implementation of the classic Battleship game, written in JavaScript. The game can be played against a computer opponent. The game board is 10x10 grid, where the player can place their ships. The player's goal is to sink all of the computer's ships before the computer sinks all of the player's ships.
Live preview: https://brokendetector.github.io/Battleship/
git clone https://github.com/BrokenDetector/Battleship.git
cd battleship
npm install
Open index.html in your browser
- JavaScript
- Jest (for testing)
- install jest in the project by running
npm install --save-dev jest
- run
npm test
to run the test