Use the arrow keys to turn the snake as you eat the food as well as dodging the edge and yourself.
I thank 'Designing Digital Games with Derek Breen'.