- Introduction
- Game
- UML-diagram
- Features
This is our Tetris project for the Object-Oriented Programming course at HCMIU in semester 2 (2022-2023). In the project, our group will cover some of the Object-Oriented Programming (OOP) Concepts: Encapsulation, Inheritance, and Polymorphism and apply them to create an update version of Tetris with some new features to the game. We hope you enjoy it!
| Order | Name | Student ID | Contribution |
|---|---|---|---|
| 1 | Nguyen Khanh Ha | ITCSIU21004 | 100% |
| 2 | Huynh Lam Dang Khoa | ITCSIU21138 | 90% |
| 3 | Nguyen Binh Phuong Huy | ITCSIU21189 | 90% |
| 4 | Tran Thanh Nguyen | ITCSIU21093 | 95% |
- Clone this repository
git clone https://github.com/hanguyen2403/Tetris-OOP.git- Open the project with IntelliJ IDEA or VSCode and check the file status
git status- Run the project
- Enjoy the game
- Language: Java
- IDEs: IntelliJ IDEA
- Library: JavaSwing
- Game Engine: Java2D
- Sound: JavaSound
| Key | Action |
|---|---|
| UP | Rotate Block |
| DOWN | Move Down |
| LEFT | Move Left |
| RIGHT | Move Right |
| SPACE | Drop Immediately |
| C | Change Block |
| Block | Image |
|---|---|
| Z block | ![]() |
| S block | ![]() |
| L block | ![]() |
| J block | ![]() |
| T block | ![]() |
| O block | ![]() |
| I block | ![]() |
The blocks are controlled by the arrow keys and the space bar. The player can move and rotate the block by pressing the arrow keys. The player can drop block immediately by pressing the space bar. The player can change the block by pressing the C key.
Unlike the original game, in this version, we decided to change something in the gameplay to make it a bit differ. We added some new features to the game, such as:
- The player can change block if they are not satisfied with the current block.
- The player can see the next three blocks to plan their next moves.
- The player can play again and again with infinite level.
- The falling speed of the block will gradually increase after each level to make the game more challenging.












