Implementation of snake game in Processing.
I mostly wrote this as an exercise in data structures, and partly to learn more about Processing. I encountered an interview question about how to implement this game, and thought it might be most efficient to use a double-ended queue to represent the snake. That's the approach I took. The front of the queue represents the head, and the back of the queue represents the tail.
- In a Processing Java environment, open the
src/snake/snake.pde
file. - Run the code.
- Et Voila!