This project is a Battleship game where the development process is guided by Test-Driven Development. It is part of The Odin Project, testing section.
This project is a classic board game called Battleship, it is implemented using HTML, CSS, and JavaScript. It allows players to play the popular Battleship game against a computer opponent.
- Player vs. Computer mode
- Drag and drop ship placement
- Ship sinking style
- Computer intelligence
To play Battleship Game, simply clone the repository to your local machine and open index.html in a web browser.
git clone https://github.com/jacob-guerrero/odin-battleship.git
cd battleship-game
- Open index.html in your web browser.
- Drag and drop your ships onto the game board.
- Click on "Start Game" to begin playing.
- Have Fun!
No configuration is required to play Battleship Game.
If you'd like to contribute to Battleship Game, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your fork.
- Submit a pull request.
- Fonts by Google Fonts.
- Drag and drop functionality by interact.js.
You can try out a live demo of Battleship Game here.
Q: Can I customize the game settings? A: Currently, Battleship Game does not have customizable settings, but you can fork the repository and modify the code to add new features.
Q: How does the computer AI work? A: The computer AI uses a simple algorithm to intelligently choose its next move, aiming to target ships that have not yet been sunk.
Q: Is Battleship Game mobile-friendly? A: It was initially designed to work on desktop but it works in mobile devices too (preferably with the desktop site option activated).