From the course: Building the Classic Snake Game with Python
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Basic snake movement program - Python Tutorial
From the course: Building the Classic Snake Game with Python
Basic snake movement program
- [Narrator] We're now going to look at how the basic snake movement can be implemented in Python. We're going to use stamps to make marks on the screen as shown in a previous video. And what I have here is the stamp code from that previous video, but I've saved it with a new name, which is basic name movement, and we're going to edit it so that it does what we want it to do for this chapter. So, first of all, let's just make a few changes outside of the main movement function. I'm going to change that comment to something just a little bit more legible. Finished nicely. Okay. So we need something like that at the end of all of our turtle programs. Then we're going to add another constant, which is delay. And you saw this in a previous video, when we were talking about animation in general. Let's do 400 failure. Obviously you can change this. This is milliseconds between frame updates. So this is going to be relatively slow, just so we can see what's happening. Then in terms of our…