Skip to content

aseel-aaa/rock-paper-scissors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Kotlin

Rock-Paper-Scissors ๐ŸŽฎ

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.


๐Ÿš€ Features

  • 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.

๐Ÿ“‚ Project Structure

  • 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.

Example Gameplay

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages