https://github.com/pbteja1998/tetris
https://github.com/pbteja1998/tetris
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pbteja1998/tetris
- Owner: pbteja1998
- Created: 2018-02-05T13:00:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T13:20:56.000Z (over 7 years ago)
- Last Synced: 2025-05-19T21:08:57.169Z (5 months ago)
- Language: Python
- Size: 146 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Controls:
- **A --> Move Left**
- **D --> Move Right**
- **S --> Rotate ClockWise**
- **SPACE --> Fall Instantly**
- **ESCAPE --> Quit the game**1. Score and level will printed below the game everytime they update
1. Score will be printed on terminal at the end of the game
1. Score = Score + 10 if a block falls
1. Score = Score + 100 if a row is filled completely
1. If a row is completely filled, then that row will be deleted
1. There are 11 Levels in total in this game.
1. Speed with which the block falls increases with level of game
1. There are total of 6 different types of blocks each with 4 configurations
1. There are 30 rows and 32 columns## Conventions:
1. `matrix[i][j] = 0` denotes unfilled block
1. `matrix[i][j] = 1` denotes filled moving block
1. `matrix[i][j] = -1` denoted filled static block that is fixed to the body## Modularity:
There are 4 modules in this code
1. `base.py` (which is primary module)
1. `block.py`
1. `board.py`
1. `figures.py` (all figures are defined in this module)## Inheritance:
1. class `Block` inherited the following classes:
`Fig1`, `Fig2`, `Fig3`, `Fig4`, `Fig5`, `Fig6` from the `figures.py` module
1. class `GamePlay` inherited the following classes:
`Block`, `Board`## Polymorphism:
Polymorphism is used in `figures.py` module