GithubHelp home page GithubHelp logo

tetris-python's Introduction

tetris-python

A tetris game coded in python.

The code worked with the following Python 3 and Pygame versions:

Python 3.9.0, pygame 2.0.1 (Tested in May 2021)

Python 3.7.4, pygame 1.9.6 (Tested in Sep 2019)

Python 3.6.5, pygame 1.9.3 (Tested in May 2018)

Installation Guide (Windows 10)

Install the latest versions of Python 3 and PIP, refer to:

https://phoenixnap.com/kb/how-to-install-python-3-windows

https://phoenixnap.com/kb/install-pip-windows

Install the latest version of Pygame: https://www.pygame.org/wiki/GettingStarted

Open command prompt, go to the directory of the file "tetris.py", type "py tetris.py" and the game should begin.

If it doesn't work with the latest ones, you can try installing the earlier versions:

https://www.python.org/downloads/

https://www.pygame.org/download.shtml

Game Controls

Right arrow -> Move the piece to the right

Left arrow -> Move the piece to the left

Down arrow -> Drop the piece

Up arrow -> Rotate the piece clockwise

Z -> Rotate the piece counterclockwise

R -> Restart

P -> Pause/Unpause

Screenshots

tetris-python's People

Contributors

ibrahimatespare avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tetris-python's Issues

line 16

line 16 is not working it this error code ```
Traceback (most recent call last):
File "main.py", line 16, in
gameDisplay = pygame.display.set_mode((DISPLAY_WIDTH,DISPLAY_HEIGHT))
pygame.error: No available video device`


line is `gameDisplay = pygame.display.set_mode((DISPLAY_WIDTH,DISPLAY_HEIGHT))`

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.