based on some principles of the game Snake. also based on code from http://www.processing.org/learning/topics/follow3.html .
Rather than random colours, I've reduced them to fire coloured ones which helps the reasoning behind him exploding after eating too much. Also added right click & hold to keep generating food.
To tweak this sketch, first download it.
Make your updates, then upload your tweak!