You are on page 1of 1

ROCK, PAPER, SCISSORS - STARTING GAME Start

int computer_score=0
player_score=0

Reset
If player_score ==5

NO YES Print “Congratulations!


You Won!”

If computer_score ==5

Generate player’s NO YES Print “Sorry, Computer End


choice and computer’s Won”
choice

If player’s choice == If player’s choice == If computer’s choice ==


ROCK PAPER SCISSORS

NO NO YES

YES
DRAW
YES NO
If computer’s choice ==
ROCK
If computer’s choice == If computer’s choice ==
NO PAPER ROCK

YES

YES
NO
YES NO
DRAW
DRAW computer_score
If computer’s choice ==
PAPER ++

If computer’s choice ==
YES SCISSORS player_score++

YES

computer_score
NO
++
computer_score
NO
player_score++ ++
player_score++

You might also like