The following is a group project by Luckie Musngi, Mel Kinghorn, Carrie, and Alec Schmitt using scrum. We were given direction in that there were choices of different games we could make, and a rubric.
This project is an implementation of the classic Battleship game, and is played with a working animated GUI using a javafx canvas.
- Tutorial
- Single-player mode against a computer opponent
- Customizable grid size
- Different types of ships with varying lengths
- Random ship placement for the computer opponent
- Turn-based gameplay with hit/miss feedback
- Skillshots
-
Clone the repository:
git clone https://github.com/yourusername/battleshipgameproject.git
-
Navigate to the project directory:
cd battleshipgameproject -
Install JavaFX:
- Download JavaFX from the official website: JavaFX Downloads
- Extract the downloaded files to a directory of your choice.
- Set the
PATH_TO_FXenvironment variable to thelibdirectory of the extracted JavaFX files.
-
Compile the project:
javac --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml -d out src/*.java
-
Run the project:
java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml -cp out GUI.java