Skip to content

sameeksha-dalvi/battleship-game

Repository files navigation

Battleship Game

Live Demo

Play the game here:
https://sameeksha-dalvi.github.io/battleship-game/

About the Project

This project is a browser version of the classic Battleship game.
It was built as part of the JavaScript curriculum from The Odin Project.

The goal of this project was to practice:

  • JavaScript modules
  • Game logic design
  • Test Driven Development (TDD)
  • DOM manipulation
  • Webpack bundling

How to Play

  1. Shuffle the ships to randomly place your fleet.
  2. Click on the enemy grid to attack.
  3. The computer will take its turn after you.
  4. The first player to sink all enemy ships wins.

Features

  • Player vs Computer gameplay
  • Ship placement phase
  • Hit and miss animations
  • Turn indicator
  • Winner screen with restart option
  • Sound effects and fireworks
  • Responsive design for mobile

Technologies Used

  • HTML
  • CSS
  • JavaScript (ES6 Modules)
  • Webpack
  • Jest (for testing)

Game Board

Game Board

Ship Setup

Ship Setup

Credits

Sound effects used in this project are from free online sound libraries.

About

This project is a browser version of the classic Battleship game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors