BattleShipZ is a Battleship game developed using JavaFX. Engage in classic naval warfare with options to play against a bot or another player.
- Player vs Bot: Test your skills against an AI opponent.
- Player vs Player: Connect through a server to play against another human player.
- Swap Button: Easily switch views between your board and the enemy's board, or modify the layout to display both boards side by side.
- In-Game Messaging: Communicate with your opponent during the game.
- Game Stats: Track your wins, losses, and other stats.
- Translation: Translate between english/french (needs more work)
- Sound Effects: Enjoy immersive game sounds, including background music, shooting, misses, wins, and losses.
-
Download the JAR file:
-
Run the JAR file in your command line:
java --module-path "/path/to/javafx-sdk-22.0.1/lib" --add-modules javafx.controls,javafx.fxml -jar JAPLabsSwing.jar
Replace
/path/to/javafx-sdk-22.0.1/lib
with the actual path to your JavaFX SDK.
-
Clone the repository:
git clone https://github.com/Ruun/BattleShipZ.git
-
Navigate to the project directory:
cd BattleShipZ
-
Use Maven to clean and build the project:
mvn clean package
-
Run the generated JAR file:
java --module-path "/path/to/javafx-sdk-22.0.1/lib" --add-modules javafx.controls,javafx.fxml -jar target/BattleShipZ-1.0-SNAPSHOT.jar
Replace
/path/to/javafx-sdk-22.0.1/lib
with the actual path to your JavaFX SDK.
The server-side implementation is largely based on this repository.