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 AbakarovGitHub | LinkedIn


⭐ If you enjoyed the game, consider giving it a star!

About

Battleship-Game

Resources

Stars

Watchers

Forks

Contributors