Introduction - If you have any usage issues, please Google them yourself
The key to the program is to represent snake patterns and snake movements. With a small rectangular block that snake section body, the body of each long section, a rectangular block, with a snake said. When moving from the head must be started, so the snake not moving in the opposite direction, if you do not press any key in the current direction, the snake to move forward, but effective press the key, head towards the direction of movement, a move a body, so effective press the key, first determine the head position. Then the snake's body with the head movement, realize graphics from the new position began to draw a snake. The appearance and disappearance of food are also painted rectangular blocks and covered rectangular blocks. For understanding, two structures are defined: Food and snakes.