you can pat UP or DOWN or LEFT or RIGHT to manipulate the snake's movement. If the snake hits the wall, the game will be over. After eating the fruit(I use yellow dot to represent it), the snake will be larger and the fruit will appear in a different place. Oh you have to know that the snake's head can not hit its body or it will die immediately.
I add up 50 blocks to interupt the snake's movement. When the snake hits the blocks, the game will end automatically. I use some methods to make sure that the blocks will not overlap with the fruit, so you can drive your snake to eat as many fruit as possible!
Not only the number of the blocks rises up to 100, but also the position of the blocks will change immediately when the snake eats the fruit. I also make sure that the blocks will not overlap with the fruit and the snake.