Slinking Slumber: Q.E.D.

There once were two snakes from South Wales
Who dreamed they were eating their tails.
They woke up quite distraught,
Stomachs tied up in knots,
And indeed, with their mouths full of scales!

java -jar Snake.jar

If you would like to see the source code, you may download it here: Snake.scala