A classic Battleship game implemented in JavaScript. Players take turns guessing the locations of their opponent's ships on a grid until one player sinks all of the other's ships.
- Single Player Mode: Play against an AI opponent.
- Grid System: Visual representation of the game board.
- Hit and Miss Feedback: Visual indicators for hits and misses.
- Frontend: HTML, CSS, JavaScript
- Game Logic: Vanilla JavaScript
-
Clone the repository:
git clone https://github.com/TaichKarna/Battleship.git
-
Navigate to the project directory:
cd Battleship npm run start
- Place your ships on the grid by dragging them to desired locations.
- Take turns guessing the coordinates of the opponent's ships.
- The game will indicate hits and misses.
- The first player to sink all opponent's ships wins!
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Push your branch (
git push origin feature-branch
). - Create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.