A simple Rock-Paper-Scissors game written in Kotlin.
The program lets you play against the computer, keeps track of scores, and allows you to continue playing rounds until you decide to quit.
- Play Rock, Paper, Scissors against the computer.
- Input validation for user choices.
- Score tracking for both user and computer.
- Option to continue or exit after each round.
- Final score displayed when the game ends.
main()โ Runs the game loop.getGameChoice()โ Randomly selects the computer's choice.getUserChoice()โ Reads and validates the user's choice.printResult()โ Determines the winner of each round and displays results.updateScore()โ Updates scores based on round results.
Please enter one of the following: Rock Paper Scissors.
Rock
You chose Rock. I chose Scissors. You win!
Do you want to continue or exit this round? [0 for exit, 1 for continue]
1 ...
Final score in this round -> Your score: 3, Game score: 2