Skip to content

akramj13/biquadris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Biquadris

A Two-Player, Turn-Based Tetris Implementation in C++20

⚠️ Academic Integrity Notice

The source code for this project is private.

This project was developed as part of a curriculum requirement at the University of Waterloo. In accordance with Policy 71 (Student Discipline), the source code cannot be publicly shared to prevent plagiarism.

If you are a recruiter or interviewer interested in reviewing the code, please contact me directly, and I can provide a private walkthrough or demonstration.

Project Overview

Biquadris is a complex, two-player spin on the classic Tetris game. It features two independent boards where players compete simultaneously. Special effects and "attacks" are triggered when players clear multiple rows, adding a competitive layer to the traditional gameplay.

Biquadris Gameplay UI

The project was built using modern C++ (C++20), utilizing experimental modules for code organization. It supports both a text-based interface and a graphical interface using X11.

Key Technical Features

  • Modern C++20 Modules: Leveraged the latest C++ standards for modular architecture.
  • Design Patterns: Heavily utilized OOP design patterns including:
    • Observer Pattern: To decouple the game state (Subject) from the text and graphical displays (Observers).
    • Decorator Pattern: To apply temporary special effects (Blind, Heavy, Force) to the game board dynamically.
    • Factory/Strategy Pattern: To manage different difficulty levels and block generation algorithms.
  • X11 Graphics: Implemented a custom windowing system for real-time game rendering.
  • RAII: Strict resource management (memory, file handles, X11 displays) using RAII idioms and smart pointers.

Gameplay Features

  • Dual-Board Multiplayer: Two players alternate moves on separate boards.
  • Special Actions: Clearing 2+ rows triggers effects on the opponent:
    • blind: Hides a portion of the opponent's board.
    • heavy: Increases the gravity/weight of the opponent's blocks.
    • force: Forces a specific block type on the opponent.
  • Level System: 5 difficulty levels (0-4) with increasing speeds and complex block generation rules.
  • Command Interpreter: Supports command aliases, multipliers (e.g., 3left), and macro sequences.

Architecture

The system is designed with high cohesion and low coupling in mind. The core game logic is separated from the presentation layer, allowing for easy swapping of display mechanisms (Text vs. Graphics).

UML Class Diagram

The UML diagram above illustrates the relationships between the central Game Controller, the Board entities, and the various Observers and Decorators.


Copyright © 2025. All rights reserved.

About

Biquadris: A two-player turn-based Tetris alternative

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors