Giter Site home page Giter Site logo

beckortikov / snake-game Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15 KB

This is my first Snake app which built with OOP concept based on Tkinter library. Here I also used pillow library. This repo is also documented with readme.md.

Python 100.00%

snake-game's Introduction

Snake app based on Tkinter

Hello, there! This is my first Snake app, which I built with python OOP conception. You will see all descriptions below. One of the futures of app that your snake speed growing after every 5 points.

How app looks like:

Requirements:

python pillow

1. First I installed virtual environment to my project

python -m venv env 

Before start working I activated working env

2. Installed pillow library for working with images

pip install pillow

3. Then I created class Snake, which I inherited from Canvas and made resizable main window

class Snake(tk.Canvas):
    pass
    ...

 #instance of Tk
 root = tk.Tk()
 #making resizable window
 root.resizable(False, False)

4. There are created 10 methods in the class include __init__ method:

Function name Description
load_assets Taking from assets img of food and snake 'png': food & snake
create_objects Creating food, snake objects and Score label
end_game Deleting all objects from window and showing Game over and Score
... ....

5. Added requirments.txt and to .gitignore added env folder.

6. Then project was pushed to Github

$ git init
$ git status
$ git add .
$ git commit -m 'My first app pushing to Github'
$ git remote add origin https://github.com/beckmiller/snake-game.git
$ git push -u origin master

That's all thank you for your attention!

snake-game's People

Contributors

beckortikov avatar

Watchers

James Cloos avatar  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.