Hey, and welcome.
Rock, paper, scissors game, for those of you that are unfamiliar with how the game works, you got
to select either rock, paper or scissors.
And depending on your selection, there's always one that can beat that as well as a tie, of course.
And then there's one that that beats.
So the basically, if you select rock, then if the other person selects paper, then they win because
paper covers the rock.
If they select scissors that you win because the rock smashes the scissors and if they also select a
rock, then it's a tie.
So that's how it works.
And this is a perfect game to practice more about game logic and setting those conditions, those wind
conditions, determining who is the winner of the selection and also math random, of course, in order
to select a random value for your opponent.
So you've got the player and you've got the opponent both making their selection and then we see who
wins.
Let me show you this game in action.
OK, so we've got the three buttons.
Those are your three choices.
You can either select rock, paper or scissors.
So let's make our selection.
How about we do paper?
And of course, this is all random.
So paper versus scissors, the computer one.
Let's try that again and I'll do paper again, paper versus paper the results and tie a draw.
And if we do paper versus scissors, the computer beat me again.
How about I try rock.
So rock versus scissors.
So I won that.
We've got some basic scoring happening here.
Randomness for the computer selection.
We have an event listener that's listening on what we selected and then we've got a condition working
out who the winner is of the game.
So let's start coding this coming up.