Snake-Pygame

This is a basic version of snake game. As it moves forward, it leaves a trail behind, resembling a moving snake. The player loses when the snake runs into the screen border (there are four walls around the screen) or itself. Snake has 5 lives. A sole player attempts to eat apples by running into them. Each apple eaten makes the snake longer and adds points. Big apples give more points.

As you run a program first the popup window shows up asking to enter the name of the player. By the end of the game the results (player's name, apples amount, points) are written to the .txt file.

The control keys are:

  • "up"
  • "down"
  • "left"
  • "right".

Double press makes the snake to speed up.

Used libraries:

  • pygame
  • tkinter