/ScissorPaperRock

This is an repository created to store the CLI and GUI based ROCK-PAPER-SCISSORS.

Primary LanguageJava

Scissor-Paper-Rock

This repository contains two implementations of the game Scissor-Paper-Rock: one implemented using Java Swing and another implemented as a command-line interface (CLI) application.

GUI Version

Files

  • SPR.java: Contains the code for the GUI version of Scissor-Paper-Rock implemented using Java Swing.

How to Play

  1. Run the SPR.java file.
  2. The game window will appear.
  3. Click on one of the buttons (ROCK, PAPER, or SCISSOR) to make your choice.
  4. The computer will randomly select its choice.
  5. The result will be displayed in the "Result" field.

CLI Version

Files

  • SPRCLI.java: Contains the code for the command-line interface (CLI) version of Scissor-Paper-Rock.

How to Play

  1. Run the SPRCLI.java file.
  2. Follow the prompts to enter your choice (rock, paper, or scissors) or type 'quit' to exit.
  3. The computer will randomly select its choice.
  4. The result will be displayed in the console.

Enjoy playing Scissor-Paper-Rock!