Snake Game in Python
The game was created using three main libraries PyGame, Time, and Random.
The player controls the snake using direction buttons - up, down, left, right, which crawls on the plane (bounded by walls), collecting red squares (apples), avoiding collisions with its own tail. Each time the snake eats a piece of food, it becomes longer, gradually complicating the game. The starting position is one cell (head) located in the center of the field. When the snake collides with the wall, it dies, when it collides with itself ("self-eating"), the snake dies and the game ends. When eating "Apples," a new cell of the snake is added. The goal of the game is to score as many points as possible.
The game was written for a course project.
#python #Programming
The player controls the snake using direction buttons - up, down, left, right, which crawls on the plane (bounded by walls), collecting red squares (apples), avoiding collisions with its own tail. Each time the snake eats a piece of food, it becomes longer, gradually complicating the game. The starting position is one cell (head) located in the center of the field. When the snake collides with the wall, it dies, when it collides with itself ("self-eating"), the snake dies and the game ends. When eating "Apples," a new cell of the snake is added. The goal of the game is to score as many points as possible.
The game was written for a course project.
#python #Programming