Skip to content
/ Snake Public

This contain Snake game designed in Python With a database for highscores in mysql

Notifications You must be signed in to change notification settings

hb57115/Snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Snake game

Snake Game

Description: This is a classic Snake game implemented in Python using the Pygame library. The player controls a snake that moves around the screen, eating food to grow longer. The game ends if the snake collides with itself or with the boundaries of the screen.

Features:

Snake movement controlled by arrow keys. Food spawns randomly on the screen. Score tracking. Game over screen with high score display. High score saved in a MySQL database. Instructions:

Run the Python script. Control the snake's direction using the arrow keys. Eat the food to grow the snake and increase your score. Avoid colliding with the boundaries of the screen or the snake itself. When the game ends, enter your name to save your score if it's a high score. Files:

snake_game.py: Python script containing the game code. README.md: Instructions and information about the game. Installation:

Ensure you have Python installed on your system. Install the required libraries by running pip install pygame mysql-connector-python. How to Run:

Open a terminal. Navigate to the directory containing snake_game.py. Run the command: python snake_game.py.

Database: Create a database named score in your mysql.

Dependencies:

Python 3.x Pygame mysql-connector-python

About

This contain Snake game designed in Python With a database for highscores in mysql

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages