Hey and welcome, this one is going to be more of a game where we're going to be having a simulated
coin toss.
So is it heads?
Is that tails?
And we know what the coin there's only two options.
There's either heads or tails.
So we're going to be using math random in order to randomize this and return back a result.
So the objective here is that the player selects either one, so they select either heads or tails.
And then depending on what the result is, if they got it right, then they score.
If they got it wrong, then they lose and then the computer wins and so on.
So you can play this game as much as you want.
Very fun, very interactive.
And it's the first of what's coming.
We've got some more complex stuff coming up.
So it's a good idea to get more familiar with it, especially math random.
You're going to using random all the times in games as well as updating elements, those event listeners
selecting as well as applying some logic in order to determine who the winner is.
So all of this is covered within this section, and I'll give you a sample of what's to come.
So it looks very plain and it is very plain, very simple.
We've got heads or tails, so we need to select either heads or tails.
We make our selection and we see that in this case, computer selected heads, player wins.
So player has one, computer is zero.
It's a very simple scoring here.
We've got heads again and this time the computer ones.
So they scored one I can pick, tails I can pick and so on.
So you got a little bit of scoring going on here as well as some logic that's being applied to determine
who the winner is.