Eat the food. Don't touch your body or the edge. Press right arrow and left arrow to change the direction of the snake.
It was not my idea. I only coded the score. I used a book.