Skip to content

Latest commit

 

History

History
84 lines (56 loc) · 2.04 KB

README.md

File metadata and controls

84 lines (56 loc) · 2.04 KB

Snake Game using Pygame

Welcome to the Snake Game repository! This repository contains a classic snake game implemented using the Pygame library in Python.

Table of Contents

Introduction

This project is a simple snake game where you control a snake that grows in length as it consumes food. The goal is to achieve the highest score possible by eating food without colliding with yourself. The game also includes a high score tracker, which saves your highest score across sessions.

Requirements

Before running the game, make sure you have the following installed:

  • Python 3.x
  • Pygame

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/snake_game.git
  2. Navigate to the project directory:

    cd snake_game
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

To start the game, run the main.py file:

python main.py

Game Controls

  • Arrow Keys (Up, Down, Left, Right) or WASD: Control the movement of the snake.
  • Space: Start or restart the game.
  • Enter: Restart the game after a game over.
  • G: Increase score by 10 (Cheat code).
  • O: Trigger game over (Cheat code).
  • V: Increase game speed (Cheat code).
  • C: Decrease game speed (Cheat code).

Features

  • Classic Snake Gameplay
  • High Score Tracking
  • Simple but effective graphics and sound effects
  • Cheat codes for testing

Contributing

Contributions are welcome! If you'd like to contribute, please fork the repository, make your changes, and submit a pull request.

License

This project is licensed. See the LICENSE file for details.


Happy gaming!