A classic Battleship board game implemented in JavaScript. Play against the computer in this strategic naval combat game!
🔗 Play Now
- 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
- Setup Phase — Place your ships on your board
- Attack Phase — Click on the enemy grid to fire
- Victory — Sink all enemy ships to win!
| Ship | Size |
|---|---|
| Carrier | 5 |
| Battleship | 4 |
| Cruiser | 3 |
| Submarine | 3 |
| Destroyer | 2 |
Visit the live demo
-
Clone the repository:
git clone https://github.com/RaulAbakarov/Project.git cd Project -
Open
index.htmlin your browser
Project/
├── index.html # Game HTML structure
├── script.js # Game logic and AI
└── style.css # Styling and animations
- Pure JavaScript — No external libraries
- CSS Grid — For game board layout
- DOM Manipulation — Dynamic game state updates
- Event Handling — Click-based interaction system
- 🟦 Water — Untouched cell
- 🔴 Hit — Successful attack on enemy ship
- ⚪ Miss — Attack on empty water
- 🟫 Ship — Your fleet position
This project is open source and available under the MIT License.
Raul Abakarov — GitHub | LinkedIn
⭐ If you enjoyed the game, consider giving it a star!