I read the source code to this a few weeks ago and got inspired to write my own 2048 clone in my Lisp of choice: Guile Scheme. It was a fun little hack.
Here's a screenshot after I mashed the arrow keys until I lost: http://media.dthompson.us/mgoblin_media/media_entries/3/Scre...
And the source (warning, messy): https://gitorious.org/guile-2d/guile-2d/source/a316893a68ae4...