1
00:00:00,120 --> 00:00:06,240
The earlier lesson, we already created a way to end the game, so that was invoking the play game over

2
00:00:06,270 --> 00:00:13,050
function so we could do the same thing for whenever the bird or the player collides with one of the

3
00:00:13,050 --> 00:00:13,830
obstacles.

4
00:00:14,070 --> 00:00:20,610
And so whatever this turns back, true, we can simply do the game over method so that we think we can

5
00:00:20,610 --> 00:00:22,370
try that out within the gameplay.

6
00:00:22,500 --> 00:00:28,440
And if we run off of the bottom of the screen or if we crash into one of the obstacles, we're going

7
00:00:28,440 --> 00:00:34,140
to see that we're invoking that game over function and then, of course, we can start again.

8
00:00:34,170 --> 00:00:38,250
So we already have taken care of the start again, the few things that we need to update some of the

9
00:00:38,250 --> 00:00:43,280
styling so we can also tweak that message and place that over top of the pipes.

10
00:00:43,680 --> 00:00:48,360
So going into where our HTML is, we've got our game message.

11
00:00:48,750 --> 00:00:54,110
So moving that game message and we can set that after the game area.

12
00:00:54,390 --> 00:00:56,940
So that will take care of that overlap.

13
00:00:56,940 --> 00:01:02,280
And now when we start, our message is actually going to be on top of it.

14
00:01:02,460 --> 00:01:04,710
We could have also adjusted the styling as well.

15
00:01:04,980 --> 00:01:09,630
So we see that we get our score, we get a game over, click here to start again.

16
00:01:09,640 --> 00:01:11,460
So we are able to start again.

17
00:01:11,610 --> 00:01:17,850
So go ahead and add in the ability to end the game whenever you crash into one of the obstacles and

18
00:01:17,850 --> 00:01:23,310
come up next, we'll do a quick game review of all of the source code that we've worked on will play

19
00:01:23,310 --> 00:01:28,080
through to make sure that there's no additional tweaks or judgments that we need to make, and that

20
00:01:28,080 --> 00:01:30,630
makes sure that the game is functioning as intended.

21
00:01:30,810 --> 00:01:32,310
So that's coming up in the next lesson.
