Skip to content

ThuanTheBadLuckCoder/Tetris

Repository files navigation

Tetris Game


Overview

This is a simple implementation of the classic Tetris game developed as a part of the Object-Oriented Programming (OOP) course. The project is built using Java and focuses on providing a highly customizable experience for players. All Tetris blocks (Tetrominoes) are fully coded, allowing for easy customization and a more user-friendly gaming experience.

Features

  • Customizable Tetrominoes: The Tetris blocks are entirely programmed with code, enabling quick and easy customization. Players can modify shapes, colors, and behaviors of the blocks to enhance their gaming experience.
  • Classic Gameplay: Retains the original Tetris gameplay mechanics, including block rotation, clearing lines, and increasing difficulty over time.
  • User-Friendly Interface: The game features a simple and intuitive interface, making it accessible to players of all ages.
  • OOP Principles: The project demonstrates the use of Object-Oriented Programming principles such as inheritance, polymorphism, and encapsulation.

Installation

To run this game on your local machine, follow these steps:
  1. Clone the repository: git clone https://github.com/yourusername/tetris-game.git

  2. Navigate to the project directory: cd tetris-game

  3. Compile the project: javac -d bin src/*.java

  4. Run the game: java -cp bin Main

How to Play

  • Move: Use the arrow keys to move the Tetromino left, right, or down.
  • Rotate: Press the "Up" arrow key to rotate the Tetromino.
  • Pause: Press the "P" key to pause the game.
  • Resume: Press the "R" key to resume the game.

Customization

To customize the Tetrominoes:
  1. Open the Tetromino.java file in the src directory.

  2. Modify the shapes, colors, or other properties as desired.

  3. Recompile and run the game to see your changes in action.

Contributing

If you'd like to contribute to the project, feel free to fork the repository and submit a pull request.

Any contributions, such as bug fixes, feature enhancements, or documentation improvements, are welcome!

Contact

If you have any questions or feedback, feel free to reach out:

Email: [email protected]

GitHub: dtr_thuann

Releases

No releases published

Packages

No packages published

Languages