A naive Snake game implementation works by using a queue data structure to store the position of every single square that the snake is a part of.
You can reduce the amount of memory by only storing the location and direction of the head, the location of the tail, and an array of locations where the snake bends.
In a 100 x 100 grid, there's 10,000 squares. A queue of points (stored as pairs of bytes) would require 10,000 * 2 bytes = 19.5KiB of memory in the worst case scenario, where every square is filled up. (This would be accomplished by the snake starting on a corner, and the dots always appearing right in front of him in an S-shaped pattern.)
Assuming you can store the location of the head, direction of the head, and location of the tail in bytes (total of 2 bytes + 2 bytes + 1 byte for location), what is the maximum amount of bends that could exist in a 100x100 grid, and how much space would you save with this method in the worst case? In the average case?