/Battleship

A single player Battleship game

Primary LanguageJavaScript

Battleship Game

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.

Getting Started

git clone https://github.com/BrokenDetector/Battleship.git
cd battleship
npm install

Open index.html in your browser

Technologies Used

  • JavaScript
  • Jest (for testing)

Running the tests

  1. install jest in the project by running npm install --save-dev jest
  2. run npm test to run the test