Snake game

We all have played this game, in which we have a moving snake which we have to move in left, right, up, or down position.

So, the more the number of fruits it will eat, the more the length of the snake will get increased.

If the snake will get collided with the walls or its tail, then the game will get over.