Search⌘ K
AI Features

Game Project: Rock, Paper, Scissors

Learn to build a Rock Paper Scissors game in C++. This lesson guides you through creating functions for greeting the user, playing rounds, deciding winners, and managing game loops. Develop skills with loops, conditionals, arrays, and random number generation while creating a user-interactive program that tracks scores until the player exits.

Let’s build a simple but fun game where the user plays Rock, Paper, Scissors against the computer! We’ll loop the game until the user wants to exit and show the current score after each round.

You’ll practice:

  • Loops

  • Conditionals

  • Strings and arrays

  • Random numbers

  • Functions

Project requirements

The game should let the user play Rock, Paper, Scissors against the computer in a loop. After each round, it should show who won and the current score. The game continues until the user types “Exit,” and then shows the final score. The following interface gives you a clearer picture of the project. To start, type your name in the window below and press the “Enter” key. ...