A simple "Rock-Paper-Scissors" Game in JavaFX
This is a simple desktop Rock-Paper-Scissors game built using JavaFX. The project idea is inspired by one of the exercises from my CS class. I later enhanced it by creating a fully functional graphical user interface (GUI) using JavaFX, applying what I learned about FXML, CSS, and controller-based architecture.
This version allows the player to choose Rock, Paper, or Scissors, generates a random choice for the computer, and displays the result. It also includes a reset feature to play again. It really helped me understand how to structure modern Java GUIs and apply event-driven programming.
- Java SE
- JavaFX
- FXML (for layout)
- JavaFX CSS (for styling)
- IntelliJ IDEA
- Rock, Paper, and Scissors button-based gameplay
- Random computer choices
- Result display (Win, Lose, or Draw)
- Clean and styled interface using JavaFX
src/
└── RockPaperScissors/
├── Main.java
├── controller/
│ ├── GameConsoleController.java
│ └── GameStarterController.java
├── view/
│ ├── GameStarter.fxml
│ └── gameConsole.fxml
├── style/
│ ├── gameconsole.css
│ └── gamestarter.css
├── assets/
│ ├── GameBgd.png
│ ├── rock.png
│ ├── paper.png
│ ├── scissors.png
└── └── PressStart2P.ttf
- Building JavaFX applications with FXML
- Styling UI components with JavaFX CSS
- Handling user input and game logic in a GUI context
Demo.vd.of.RPS.game.mov
As a Computer Science student, I enjoy turning class exercises into real projects. This was originally a simple command-line assignment, but creating a GUI with JavaFX made it much more fun and meaningful.