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!