Welcome to the Battleship Game written in Java. This classic game allows you to engage in strategic naval warfare against an opponent by trying to sink their fleet of ships while protecting your own.
- A graphical user interface built with JavaFX for an immersive gaming experience.
- Single-player mode against an AI opponent.
- A user-friendly interface with a grid to track your shots and the opponent's fleet.
- Leaderboard on startscreen with best performances
To run the Battleship Game, you need the following:
- Java Development Kit (JDK) 11 or higher installed on your system.
- JavaFX SDK 11 or higher installed and properly configured.
ย If there is any problems with finding filepaths, press CTRL+SHIFT+P and type >Java: Clean Language Server Workspace
- Press run over the main-method in battleshipApp.java to start the game
- Login with a username and press PLAY
- The game board consists of two grids: one for your fleet and one for your opponent's fleet.
- Click on cells in your own board to place ships - you have 5 ships to place (use ALT+Click to get horizontal ships)
- Click on the cells in your opponent's grid to take shots and try to sink their ships.
- Your fleet is on the left side, and your opponent's fleet is on the right side.
- The game ends when all of your opponent's ships are sunk or when your fleet is destroyed.
- You can view the leaderboard by clicking on the Leaderboard button on the startscreen.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the classic Battleship board game.