Skip to content

ggab13/battleship

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Battleship

battleship

Description

This is Battleship, a classic naval strategy game brought to life as a web-based application. This project allows you to play Battleship against a computer opponent in a challenging and entertaining digital environment. Test your tactical skills, sink enemy ships, and emerge victorious in this battle on the high seas.

You can view the live demo of this project --> Here <--.

Built With

My Skills

Features

  • Single-Player Mode: Challenge a computer opponent in a one-on-one naval battle.
  • User-Friendly Interface: The game features an intuitive interface with clear instructions.
  • Ships Variety: Enjoy the classic Battleship experience with different ship sizes.

Installation

    • Clone the repo
git clone https://github.com/ggab13/battleship.git
    • Navigate to the project directory
 cd battleship  
    • Install dependencies
npm install
    • Navigate to dist folder
cd battleship  
    • Open the index.html file in your web browser to play the game.
start index.html  

How to play

Playing Battleship is easy and engaging:

Game Setup: The game begins by placing your ships on the grid. Click on the grid squares to position your ships horizontally or vertically. Once placed, your opponent will randomly position its ships.

Gameplay: Take turns with the computer opponent to select a grid square to fire upon. The grid will display hit and miss markers as you make your moves.

Hit and Sunk: When you hit a ship, it will display a visual effect, and you will receive feedback on the ship's status. Sink all your opponent's ships to win the game.

Game Outcome: The game will announce the winner and provide an option to restart for another round.

About

Battleship game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published