Skip to content

Allisonmini/Rock_Paper_Scissors_Game

Repository files navigation

Rock_Paper_Scissors_Game ✊🖐️✌️

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.


Built With

  • Java SE
  • JavaFX
  • FXML (for layout)
  • JavaFX CSS (for styling)
  • IntelliJ IDEA

Features

  • Rock, Paper, and Scissors button-based gameplay
  • Random computer choices
  • Result display (Win, Lose, or Draw)
  • Clean and styled interface using JavaFX

Project Structure

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

What I Learned

  • Building JavaFX applications with FXML
  • Styling UI components with JavaFX CSS
  • Handling user input and game logic in a GUI context

Demo

Demo.vd.of.RPS.game.mov

Personal Note

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.

About

A simple "Rock-Paper-Scissors" Game in JAVAFX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published