WEBVTT

0
00:00.450 --> 00:02.430
The first challenge is pretty simple.

1
00:02.460 --> 00:04.740
We're just going to create the starting screen.

2
00:05.160 --> 00:10.160
It's going to be a screen that has a height of 600 pixels and a width of 800

3
00:10.950 --> 00:14.880
pixels. It should be black in terms of the background color,

4
00:15.300 --> 00:18.510
and it should stay on the screen until we click on it.

5
00:18.930 --> 00:20.790
So using what you've learned so far,

6
00:20.910 --> 00:24.000
go ahead and set up the starting code for our project.

7
00:27.140 --> 00:31.520
All right. So I've created a brand new project which I've called pong-game,

8
00:31.940 --> 00:34.580
and I've created a main.py. Now,

9
00:34.610 --> 00:39.610
the first thing I'm going to do is I'm going to import a screen from the turtle

10
00:39.830 --> 00:40.663
module.

11
00:42.860 --> 00:46.790
And then I'm going to create a screen object from the Screen class,

12
00:47.180 --> 00:50.780
and then I'm going to set the background color to black.

13
00:51.560 --> 00:56.560
And then, of course, we'll need to set up the screen so that it has a width of

14
00:57.650 --> 01:02.180
800 and a height of 600.

15
01:04.100 --> 01:07.090
So now if I run this code as it is,

16
01:11.270 --> 01:13.940
you'll see that it flashes up and it disappears.

17
01:13.970 --> 01:17.030
So of course we need that exitonclick method.

18
01:17.030 --> 01:21.140
As well as a final finishing touch, this is completely optional

19
01:21.380 --> 01:23.630
but it helps to identify the program,

20
01:23.750 --> 01:27.800
we can change the screens title to say Pong.

21
01:28.730 --> 01:33.320
And now when I run the code, you can see that this window now says pong.

22
01:34.880 --> 01:38.150
So we now have our 800 by 600 screen,

23
01:38.510 --> 01:43.040
and we're now ready to head to the next step where we create our paddles.