Skip to content

Quad Clash is a competitive, two-player Tetris-inspired game built in C++. It features sabotage mechanics, scripted block sequences, and multiple levels of randomness. Players can compete in both text-based and graphical modes, showcasing object-oriented design and modular game architecture.

Notifications You must be signed in to change notification settings

Jeffery05/QuadClash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Quad Clash

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

Gameplay Screenshot
Two-player mode — text (left) and GUI (right) running side by side.


📖 Description

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.


🚨 Academic Integrity & Access

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.


🎮 Features

  • 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

🧠 What’s Different from “Normal” Tetris?

  • 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

🏗️ Tech Stack

  • Language: C++ (modern OOP, RAII)
  • Graphics: X11 (for the GUI build)
  • Build: make (Makefile provided)
  • Design: inheritance + composition, Strategy/Factory style components

⌨️ Controls

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., 5down moves a piece down 5 times).


🧩 Sabotage & Levels

  • 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

🧪 Scripted Sequences & Seeds

  • Use --seed <N> for reproducible runs.
  • Use --scriptfile <path> to load a predefined block sequence.
  • Great for testing edge cases or running consistent demos.

🧩 Architecture Overview

  • Core Entities: Game, Board, Player
  • Pieces: Tetrominoes implemented via a Piece hierarchy
  • Input Control: RngProvider (seeded randomness) + ScriptProvider (deterministic inputs)
  • Rendering: Renderer interface with TextRenderer and X11Renderer implementations
  • Command Parsing: CommandParser supporting repeats (3left), batch inputs, and scripted play

📦 Getting Started

Prerequisites

  • Linux or WSL recommended
  • g++, make
  • For GUI: X11 development headers (e.g., libx11-dev)

About

Quad Clash is a competitive, two-player Tetris-inspired game built in C++. It features sabotage mechanics, scripted block sequences, and multiple levels of randomness. Players can compete in both text-based and graphical modes, showcasing object-oriented design and modular game architecture.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published