Part 2 left off with a square moving on a grid. Now, let's take control of it by consuming KEYDOWN events. One simple approach would be to have a variable that represents one of the four directions the snake can go.

It might use values 0-3, or it could use string literals like "up" and "left". A slightly more advanced technique would be to use the Vector2 class. We use pygame's Vector2 to keep tra