A nostalgic dive into the fundamentals of desktop application development. This project is a fully functional implementation of the timeless Rock-Paper-Scissors game, built during the transition era of Java web and desktop technologies.
It serves as a clean showcase of Java Swing for local UI and Java Applets for browser-integrated execution, demonstrating event-driven programming and state management in a graphical environment.
- Classic Gameplay: Quick-fire rounds against a randomized computer opponent.
- Hybrid Deployment: Supports both standalone desktop execution and vintage web-applet integration.
- Intuitive UI: Built with Java Swing components to ensure a responsive, lightweight user experience.
- Dynamic Logic: Real-time score tracking and immediate result feedback for every round.
The project is structured to separate the core game logic from the graphical rendering:
- Java Swing: Handles the windowing, button layouts, and action listeners.
- Event Handling: Uses robust listeners to capture user input and trigger the "AI" decision engine.
- Cross-Platform: Leverages the Java Runtime Environment (JRE) to run seamlessly across different operating systems.
You will need a Java Development Kit (JDK) installed on your machine.
- Note: As Applets are deprecated in modern browsers, it is recommended to run this as a standalone application using a JDK that supports Swing.
- Clone the Repo:
git clone https://github.com/yogg17/Rock-Paper-Scissors.git cd Rock-Paper-Scissors - Build and Run:
If you are using an IDE like NetBeans (as indicated by the project files), simply open the project and hit Run. Alternatively, compile via command line:
javac src/rockgame/*.java java rockgame.RockGame # Or the primary main class
Looking back, this project was a fantastic exercise in mastering the MVC (Model-View-Controller) pattern within a GUI context. Balancing the constraints of Java Applets with the flexibility of Swing provided great insight into how Java once powered interactive web content. It remains a solid reference for anyone learning how to bridge backend logic with a visual interface.
Maintained with ❤️ by yogg17