This is the main procedure:
This is the game loop:
This is the procedure that print the snake on the screen:
This program is very old but I still remember the feeling after I implemented it in one evening and in particular the satisfaction of the following day when I showed it to my class mates. They were shocked!
This is what I call fun!