1
00:00:00,480 --> 00:00:01,050
Hey guys,

2
00:00:01,050 --> 00:00:06,050
welcome to Day 19 of 100 Days of Code. Today

3
00:00:06,150 --> 00:00:09,060
we're going to be learning more about turtle graphics,

4
00:00:09,330 --> 00:00:14,220
but we're also going to look at event listeners, higher order functions, state,

5
00:00:14,310 --> 00:00:16,950
and multiple instances of an object.

6
00:00:17,160 --> 00:00:21,540
And we're going to be using this knowledge to build a whole bunch of games. We're

7
00:00:21,540 --> 00:00:24,960
going to be making Etch-a-Sketch, one of my favorite childhood toys.

8
00:00:25,320 --> 00:00:30,320
And this game is going to allow us to use the up and down arrows to move our

9
00:00:30,360 --> 00:00:32,040
turtle forwards and back

10
00:00:32,369 --> 00:00:37,370
and then we can turn our turtle clockwise and anticlockwise to continue

11
00:00:38,640 --> 00:00:39,270
drawing.

12
00:00:39,270 --> 00:00:44,270
So we can use this to create circles or to create lines.

13
00:00:46,140 --> 00:00:50,430
And we can basically create drawings using our turtle program.

14
00:00:51,060 --> 00:00:51,660
In addition,

15
00:00:51,660 --> 00:00:56,660
we're also going to be making a turtle racing game where we will get to bet on

16
00:00:56,820 --> 00:00:59,850
the color of a turtle who will win the race.

17
00:01:00,270 --> 00:01:02,850
And then once we click okay to the popup,

18
00:01:03,150 --> 00:01:08,150
then all of our turtles go to the starting line and they start moving at a

19
00:01:08,340 --> 00:01:09,360
random pace.

20
00:01:09,990 --> 00:01:14,250
And then once the first turtle hits the right edge of the screen,

21
00:01:14,520 --> 00:01:19,520
it will be declared the winner and we will get to see if our turtle won or not.

22
00:01:20,340 --> 00:01:24,300
So at the moment, the red turtle is not looking like it's going to make it.

23
00:01:24,500 --> 00:01:28,010
I think the orange is probably-- Oh, the yellow's overtaking it.

24
00:01:30,500 --> 00:01:34,040
And there we go. We lose. The purple turtle

25
00:01:34,140 --> 00:01:36,920
was the winner of the race. So I hope you're

26
00:01:37,130 --> 00:01:41,660
as excited as I am to build these projects together. Once you're ready,

27
00:01:41,690 --> 00:01:46,280
head over to the next lesson and let's learn about how we can listen to key

28
00:01:46,280 --> 00:01:47,810
strokes on the keyboard.

