1
00:00:00,330 --> 00:00:05,940
Hey and welcome, this one is going to be more of a game where we're going to be having a simulated

2
00:00:05,940 --> 00:00:06,670
coin toss.

3
00:00:06,690 --> 00:00:07,710
So is it heads?

4
00:00:07,710 --> 00:00:08,520
Is that tails?

5
00:00:08,640 --> 00:00:10,920
And we know what the coin there's only two options.

6
00:00:11,040 --> 00:00:12,480
There's either heads or tails.

7
00:00:12,630 --> 00:00:18,100
So we're going to be using math random in order to randomize this and return back a result.

8
00:00:18,300 --> 00:00:24,150
So the objective here is that the player selects either one, so they select either heads or tails.

9
00:00:24,330 --> 00:00:29,970
And then depending on what the result is, if they got it right, then they score.

10
00:00:29,970 --> 00:00:34,620
If they got it wrong, then they lose and then the computer wins and so on.

11
00:00:34,860 --> 00:00:37,220
So you can play this game as much as you want.

12
00:00:37,230 --> 00:00:38,790
Very fun, very interactive.

13
00:00:38,940 --> 00:00:41,180
And it's the first of what's coming.

14
00:00:41,190 --> 00:00:43,370
We've got some more complex stuff coming up.

15
00:00:43,500 --> 00:00:47,010
So it's a good idea to get more familiar with it, especially math random.

16
00:00:47,010 --> 00:00:53,370
You're going to using random all the times in games as well as updating elements, those event listeners

17
00:00:53,370 --> 00:00:57,750
selecting as well as applying some logic in order to determine who the winner is.

18
00:00:57,930 --> 00:01:03,000
So all of this is covered within this section, and I'll give you a sample of what's to come.

19
00:01:03,240 --> 00:01:06,270
So it looks very plain and it is very plain, very simple.

20
00:01:06,300 --> 00:01:09,870
We've got heads or tails, so we need to select either heads or tails.

21
00:01:10,020 --> 00:01:15,560
We make our selection and we see that in this case, computer selected heads, player wins.

22
00:01:15,780 --> 00:01:18,400
So player has one, computer is zero.

23
00:01:18,540 --> 00:01:20,160
It's a very simple scoring here.

24
00:01:20,340 --> 00:01:23,730
We've got heads again and this time the computer ones.

25
00:01:23,730 --> 00:01:27,550
So they scored one I can pick, tails I can pick and so on.

26
00:01:27,570 --> 00:01:32,310
So you got a little bit of scoring going on here as well as some logic that's being applied to determine

27
00:01:32,310 --> 00:01:33,000
who the winner is.
