Classic console based game with Java Ant
#How to Play The computer randomly selects either Stone, Paper, or Scissors.
The user is prompted to enter their choice:
Enter 0 for Stone. Enter 1 for Paper. Enter 2 for Scissors. The program compares the user's choice to the computer's choice and determines the winner based on the classic Rock, Paper, Scissors rules:
Stone crushes Scissors (Stone wins). Scissors cut Paper (Scissors wins). Paper covers Stone (Paper wins). The result of the game (win, lose, or draw) is displayed on the console.
#How to Run Clone the repository:
bash git clone https://github.com/Alwaysbg/JavaRPS.git Navigate to the project directory:
bash cd JavaRPS.git Compile the Java file:
bash javac ex3/pkg17/rock/paper/scissor/game/RockPaperScissorGame.java Run the compiled program:
bash java ex3.pkg17.rock.paper.scissor.game.RockPaperScissorGame