Skip to content

RaulAbakarov/Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿšข Battleship Game

A classic Battleship board game implemented in JavaScript. Play against the computer in this strategic naval combat game!

JavaScript HTML5 CSS3

๐ŸŽฎ Live Demo

๐Ÿ”— Play Now

โœจ Features

  • Interactive Gameplay โ€” Click to attack enemy positions
  • AI Opponent โ€” Play against computer with strategic moves
  • Visual Feedback โ€” Clear hit/miss indicators
  • Responsive Design โ€” Works on desktop and mobile
  • Ship Placement โ€” Strategic positioning of your fleet

๐ŸŽฏ How to Play

  1. Setup Phase โ€” Place your ships on your board
  2. Attack Phase โ€” Click on the enemy grid to fire
  3. Victory โ€” Sink all enemy ships to win!

Ship Types

Ship Size
Carrier 5
Battleship 4
Cruiser 3
Submarine 3
Destroyer 2

๐Ÿš€ Getting Started

Play Online

Visit the live demo

Run Locally

  1. Clone the repository:

    git clone https://github.com/RaulAbakarov/Project.git
    cd Project
  2. Open index.html in your browser

๐Ÿ—๏ธ Project Structure

Project/
โ”œโ”€โ”€ index.html    # Game HTML structure
โ”œโ”€โ”€ script.js     # Game logic and AI
โ””โ”€โ”€ style.css     # Styling and animations

๐Ÿ› ๏ธ Technical Highlights

  • Pure JavaScript โ€” No external libraries
  • CSS Grid โ€” For game board layout
  • DOM Manipulation โ€” Dynamic game state updates
  • Event Handling โ€” Click-based interaction system

๐Ÿ“ธ Game States

  • ๐ŸŸฆ Water โ€” Untouched cell
  • ๐Ÿ”ด Hit โ€” Successful attack on enemy ship
  • โšช Miss โ€” Attack on empty water
  • ๐ŸŸซ Ship โ€” Your fleet position

๐Ÿ“„ License

This project is open source and available under the MIT License.

๐Ÿ‘ค Author

Raul Abakarov โ€” GitHub | LinkedIn


โญ If you enjoyed the game, consider giving it a star!

About

Battleship-Game

Resources

Stars

Watchers

Forks

Contributors