The UI is simple but the functionality is working fine, what the users need to do is to use keyboards(up-arrow, right-arrow, down-arrow, left-arrow) to control directions of the snake. The score will be recorded once the snake hit the targe and the snake’s size will be auto-increment. The game will end if the snake hit itself or the edge.
The source code can be found on GitHub: https://github.com/zhujy8833/Snake
There is another version which I put in jsFiddle: http://jsfiddle.net/zhujy_8833/bRMjV/
Click Here to view the live demo.