Skip to content

A tetris-like game made in python using the pygame library

Notifications You must be signed in to change notification settings

bdunton9323/pyblocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyBlocks

This is my own variation of a very popular game. I wrote it in python using the pygame framework. This was my first "real" python project, and was largely done to teach myself python. Since it was a learning project, there are many things I would do differently, but I am happy with the way it turned out.

Setting up the prerequisites

I recommend installing pyenv to enable easy installing, and toggling between, different python versions. The PyGame framework is particular about python versions. This has been tested with python 3.9.5.

To install the dependencies needed for pygame:

$ ./setup.sh

Running the game

If the virtualenv is not activated yet (the setup script activates it), run:

$ source .venv/bin/activate

To run the game:

(.venv) $ python launch.py

Gameplay

The default key mappings are:

  • z - rotate left
  • x - rotate right
  • space - drop the piece
  • esc - go to menu

Development

Running the tests

(.venv) $ python -m unittest test/*.py

About

A tetris-like game made in python using the pygame library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published