Sink or be sunk! Engage in strategic naval warfare in this classic Battleship game, reimagined in Python with my own AI as your competitor.
- Multiple game modes: Choose from Player vs. Computer, Player vs. Player, or Computer vs. Computer to tailor your experience.
- Difficulty levels: Test your skills against the computer in Easy or Hard mode.
- Intuitive interface: Easily place your ships and target your opponent's fleet using a clear and user-friendly grid system.
- Sleek visuals: Enjoy a visually appealing game board and smooth animations.
- Detailed tracking: Keep track of your hits, misses, and sunk ships with clear indicators.
-
Install Python: Ensure you have
Python >= 3.11
installed on your system. -
Download the game: Clone this repository using the command:
git clone https://github.com/mcspidey95/bottleship.git
cd bottleship
-
Run the game: Navigate to the project directory and execute the main script:
python gui.py
- Choose a game mode: Select your preferred mode from the main menu.
- Take turns: Players (or the computer) take turns targeting coordinates on the opponent's grid.
- Record hits and misses: Mark each shot as a hit or miss on both grids.
- Sink ships: Successfully hit all coordinates of an opponent's ship to sink it.
- Win the game: The first player to sink all of the opponent's ships wins!
esc - Quit Game 🔵 - Miss
backspace - Retry 🟠 - Hit
space - Pause Game 🔴 - Sunk
mouse click - Select Coordinate
- Libraries used: Pygame (for graphics and user input)
- Customization: Feel free to explore the code and tweak game parameters or visuals to your liking.
We welcome feedback and contributions to enhance the game! Feel free to open issues or submit pull requests for any suggestions or improvements.
Let the battles begin!