A competitive, two-player twist on the classic tetris game.

Two-player mode — text (left) and GUI (right) running side by side.
Quad Clash (formerly “biquadris”)
Quad Clash is a competitive, two-player twist on the classic Tetris game, built in C++ as part of CS246 at the University of Waterloo. Unlike traditional Tetris, it introduces head-to-head gameplay where players can sabotage each other by altering block sequences, applying “heavy” gravity, or injecting obstacles. The game supports both text-based and graphical interfaces, multiple difficulty levels that change randomness, and scripted input files for deterministic testing. Designed with object-oriented principles, Quad Clash features a modular architecture that cleanly separates game logic, rendering, and command parsing, making it both extensible and robust.
This project was developed for CS246 (Object-Oriented Software Development) at the University of Waterloo.
Per UW’s code-sharing policy, the source code is kept private.
Recruiters/Employers: please contact me and I can provide private access or a guided walkthrough.
- Two-player head-to-head play with real-time pressure
- Dual interfaces: text console and X11-based GUI
- Sabotage mechanics: trigger effects on your opponent after certain clears
- Scripted sequences: load block scripts to test edge cases & strategies
- Multi-level difficulty: levels change RNG behavior and piece distributions
- Rich command set: rotations, repeats, level control, restart, and more
- PvP focus: interfere with the opponent (e.g., inject junk, alter next piece)
- Deterministic testing: run from seeded RNG or script files
- Console + GUI parity: identical rules across two display modes
- Command-driven controls: repeat counts (
3left), level commands, scripted input
- Language: C++ (modern OOP, RAII)
- Graphics: X11 (for the GUI build)
- Build:
make(Makefile provided) - Design: inheritance + composition, Strategy/Factory style components
| Command | Action |
|---|---|
left, right, down |
Move piece |
drop |
Hard drop |
clockwise, counterclockwise |
Rotate piece |
levelup, leveldown |
Adjust difficulty level |
restart |
Restart current game |
3left, 2drop, etc. |
Repeat any command N times |
💡 Tip: Prefix a command with a number to repeat it (e.g.,
5downmoves a piece down 5 times).
- Sabotage Triggers: Clearing certain numbers of lines or specific patterns can:
- alter the opponent’s next piece
- add junk/obstacles to their board
- apply “heavy” gravity for a duration
- Levels: Higher levels can:
- bias RNG toward harder pieces
- increase falling speed
- change the available piece set
- Use
--seed <N>for reproducible runs. - Use
--scriptfile <path>to load a predefined block sequence. - Great for testing edge cases or running consistent demos.
- Core Entities:
Game,Board,Player - Pieces: Tetrominoes implemented via a
Piecehierarchy - Input Control:
RngProvider(seeded randomness) +ScriptProvider(deterministic inputs) - Rendering:
Rendererinterface withTextRendererandX11Rendererimplementations - Command Parsing:
CommandParsersupporting repeats (3left), batch inputs, and scripted play
- Linux or WSL recommended
g++,make- For GUI: X11 development headers (e.g.,
libx11-dev)