0:00
All right.
00:01
So for this little program, we are animating a car as it moves across the screen.
00:08
And we're going to create four different copies of this animation and show it all in the same window.
00:14
So for this, we're going to need three different classes.
00:19
First, we've got this car racing class, which is just going to manage our window in the application.
00:26
Here we just create a tk window, add a title.
00:30
We'll add some logic in the middle and then we call the main loop.
00:35
We also have this track class which inherits from canvas.
00:40
This is going to manage each copy of our animation.
00:44
It's also going to be responsible for calling the animate functions.
00:50
And then lastly, we have this car class, which just represents the data for a car, and it controls the individual parts of a car.
01:01
I've gone ahead and created the different shapes that make up our car.
01:05
This x and y coordinate here is the origin of our car with the bottom left -hand corner.
01:11
And then all of these numbers are based off of that origin point.
01:16
All of the shapes are stored in this self -dot shapes list.
01:20
And then we're also keeping track of the front position or the right -most edge of the car.
01:28
And then up here we have a global speed attribute.
01:34
So down in our car racing class, we're going to want to go ahead and create four different tracks...