Skip to content

zachschm/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snake

Orignal Snake game | Python | Turtle

First ever game created in any programming language and first ever completed python project. In this project, python and turtle were used to implement the snake game. The snake game is a simple game where the user controls the movement of a snake. The user directs the snake to eat food to gain score. The user loses when the snake collides with the wall or with itself. This project was a learning step within python to learn functions, classes, inheritance, event listeners, the turtle library, and external file inclusion for input and output. The project was a great joy to program and many important python concepts were learned. The main challenge of this program came in the movement of the snake. The snake is composed of many individual turtles that continue to grow in number as the snake eats food. So, to move the snake seamlessly, the head of the snake needs to be the turtle receiving the direction updates. Then, each turtle there after cascades and moves to the address of the previous snake. This logic was quite fun to mess around with and implement. Additionally, I was able to learn basic file inclusion within python which was vital for including a high score feature within the program.

Sample Image:

Screen Shot 2023-02-20 at 3 43 00 PM

Releases

No releases published

Packages

No packages published

Languages