Coder Social home page Coder Social logo

ridsb / snake-game-python Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4 KB

Experience classic Snake Game fun! Control the snake, eat apples to grow, and avoid collisions. Simple controls, customizable settings, and endless entertainment. Play now and challenge yourself to achieve the highest score! ๐Ÿ๐Ÿ #SnakeGame #Python #Pygame

Python 100.00%

snake-game-python's Introduction

Snake Game

A simple Snake Game implemented in Python using the Pygame library.

image

image

Instructions

  1. Install Pygame:

    pip install pygame
  2. Run the game:

    python snake_game.py
  3. Control the snake using arrow keys: UP, DOWN, LEFT, RIGHT.

  4. Eat apples to grow the snake and increase your score.

  5. Avoid collisions with the snake's own body.

  6. Press 'ESC' to exit the game.

Gameplay

  • The snake starts with 3 segments.
  • Each apple eaten adds 10 points to the score.
  • The game ends if the snake collides with its own body.

Controls

  • UP Arrow: Move the snake up
  • DOWN Arrow: Move the snake down
  • LEFT Arrow: Move the snake left
  • RIGHT Arrow: Move the snake right
  • ESC: Exit the game

Features

  • Customizable constants such as snake size, apple size, and screen dimensions.
  • Game over screen with the option to play again.

Dependencies

  • Pygame: A cross-platform set of Python modules designed for writing video games.

Contributing

Feel free to contribute to the improvement of this Snake Game. Fork the repository, make your changes, and submit a pull request.

snake-game-python's People

Contributors

ridsb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.