OOP version Snake Game written in Python using the turtle library.
Snake is a sub-genre of action video games where the player maneuvers the end of a growing line, often themed as a snake. The player must keep the snake from colliding with both wall and itself, which gets harder as the snake lengthens.
Try to play Snake Game on google
You will need the following software to run the Snake Game:
To get started with the Snake Game, follow these steps:
- Clone the repository:
git clone https://github.com/resole79/snake_game.git
- Run the main.py file:
python main.py
- main.py: Main program.
- snake.py: Snake class
- Instance: list_of_piece, head
- Method: create_snake, tail, add_tail, reset_snake, move_snake, snake_right, snake_left, snake_up, snake_down
- food.py: Food class
- Method: random_food
- scoreboard.py: Scoreboard class
- Instance: score, level, high_score, level_speed
- Method:
game_over, read_scoreboard_file, increase_score, increase_level, update_high_score, refresh_score
- display.py: MyScreen class
- Instance: list_of_window, this_window, x_coord, y_coord
- Method: create_window, listen_snake
- bord.py: BordGame class
- Method: create_bord,
Press keys to move the snake:
- "Right" to move right
- "Left" to move left
- "Up" to move up
- "Down" to move up down
Author : Emilio Reforgiato (resole79)