This repository contains a Java Rock Paper Scissors game built for CS 151. The project started as a console app and now includes a JavaFX GUI.
- Java 21
- Maven 3.9+
Check your versions:
java -version
mvn -vFrom the project root:
mvn clean compile
mvn javafx:run- Plays Rock Paper Scissors for a configurable number of rounds
- Supports two computer strategies:
- Random strategy
- Prediction-based strategy
- Tracks per-round results and running stats (human wins, computer wins, ties)
- Supports starting a new game from the GUI
src/main/java/depen/App.java- JavaFX entry point and UI/controller flowsrc/main/java/depen/GameSession.java- game session state and round progressionsrc/main/java/depen/GameRules.java- round outcome and score logicsrc/main/java/depen/StrategyFactory.java- strategy selectionsrc/main/java/depen/RandomStrategy.java- random move selectionsrc/main/java/depen/Prediction.java- prediction strategy wrappersrc/main/java/depen/PredictionModel.java- prediction algorithm statesrc/main/java/depen/DataLoader.java- player data persistencesrc/main/java/depen/UserManagement.java- player lookup and creation
- Player data is stored in JSON files in the project directory.
- If you are running from an IDE, make sure Maven dependencies are imported and JavaFX is enabled.