This is a simple implementation of the classic Battleship game that you can play directly in your web browser.
Based on Project: Battleship from The Odin Project cubiculum.
Play around and let me know your opinions!
To play the game, you can either download the source code and host it locally or access the live demo online.
👉🏻 Live Demo !
First install dependencies:
npm install
To create a production build:
npm run build-prod
To create a development build:
npm run build-dev
node dist/bundle.js
To run unit tests:
npm test
The Battleship game is a two-player strategy game where each player takes turns to guess the coordinates of their opponent's ships on a grid. The goal is to sink all of the opponent's ships before they sink yours.
- Aircraft Carrier (5 spaces)
- Battleship (4 spaces)
- Cruiser (3 spaces)
- 2x Destroyer (2 spaces)
- 2x Submarine (1 space)
- Realistic grid layout for the game board.
- Interactive interface for placing ships and making guesses.
- Visual representation of hits, misses, and sunk ships.
- End-of-game notification and option to restart.
- Open the game in your web browser.
- Select your name.
- Organize your ships.
- Take turns guessing the coordinates to locate and sink the opponent's ships.
- The game continues until one player sinks all of the opponent's ships.
- A winner is declared, and players have the option to restart the game.
- HTML5
- CSS3
- JavaScript (ES6+)
- Webpack
- Babel
- Eslint
- Favicons-webpack-plugin
- Html-webpack-plugin
- Normalize.css
Made with createapp.dev Special thanks to the following:
BattleShip is open-source software licensed under the MIT License. Feel free to use, modify, and distribute it as per the terms of the license.