added comments to snake.coffee and fixed the bug with opposite direction change