1
00:00:00,090 --> 00:00:01,180
Hey, and welcome.

2
00:00:01,200 --> 00:00:06,480
Rock, paper, scissors game, for those of you that are unfamiliar with how the game works, you got

3
00:00:06,480 --> 00:00:09,090
to select either rock, paper or scissors.

4
00:00:09,210 --> 00:00:15,060
And depending on your selection, there's always one that can beat that as well as a tie, of course.

5
00:00:15,060 --> 00:00:16,650
And then there's one that that beats.

6
00:00:16,830 --> 00:00:22,470
So the basically, if you select rock, then if the other person selects paper, then they win because

7
00:00:22,620 --> 00:00:23,880
paper covers the rock.

8
00:00:24,030 --> 00:00:29,700
If they select scissors that you win because the rock smashes the scissors and if they also select a

9
00:00:29,700 --> 00:00:31,170
rock, then it's a tie.

10
00:00:31,440 --> 00:00:32,370
So that's how it works.

11
00:00:32,370 --> 00:00:38,970
And this is a perfect game to practice more about game logic and setting those conditions, those wind

12
00:00:38,970 --> 00:00:46,200
conditions, determining who is the winner of the selection and also math random, of course, in order

13
00:00:46,200 --> 00:00:49,440
to select a random value for your opponent.

14
00:00:49,650 --> 00:00:54,600
So you've got the player and you've got the opponent both making their selection and then we see who

15
00:00:54,600 --> 00:00:54,970
wins.

16
00:00:55,110 --> 00:00:56,510
Let me show you this game in action.

17
00:00:57,000 --> 00:00:58,740
OK, so we've got the three buttons.

18
00:00:58,740 --> 00:01:00,000
Those are your three choices.

19
00:01:00,000 --> 00:01:03,270
You can either select rock, paper or scissors.

20
00:01:03,270 --> 00:01:04,530
So let's make our selection.

21
00:01:04,530 --> 00:01:05,610
How about we do paper?

22
00:01:05,610 --> 00:01:07,410
And of course, this is all random.

23
00:01:07,410 --> 00:01:10,800
So paper versus scissors, the computer one.

24
00:01:10,980 --> 00:01:17,130
Let's try that again and I'll do paper again, paper versus paper the results and tie a draw.

25
00:01:17,310 --> 00:01:21,180
And if we do paper versus scissors, the computer beat me again.

26
00:01:21,180 --> 00:01:22,170
How about I try rock.

27
00:01:22,350 --> 00:01:23,880
So rock versus scissors.

28
00:01:23,880 --> 00:01:24,930
So I won that.

29
00:01:25,080 --> 00:01:27,300
We've got some basic scoring happening here.

30
00:01:27,450 --> 00:01:29,760
Randomness for the computer selection.

31
00:01:29,970 --> 00:01:35,100
We have an event listener that's listening on what we selected and then we've got a condition working

32
00:01:35,100 --> 00:01:36,720
out who the winner is of the game.

33
00:01:37,110 --> 00:01:38,880
So let's start coding this coming up.
