add control buttons to control the direction of the snake. fix some bugs.