Skip to content

Corg-Labs/blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Tetris

Tetris in the terminal, written in C.

A small, self-contained demo written in pure C — no external libraries, just the standard library and POSIX. Part of the Corg-Labs collection of single-file C programs.


How It Works

  1. Seven tetromino shapes are stored as 4x4 rotation bitmasks
  2. Collision is checked against walls, floor and settled blocks
  3. A gravity tick drops the active piece on a timer
  4. Full rows are cleared and scored

Build

gcc blocks.c -o blocks

Run

./blocks

Controls

a/d move, w rotate, s soft-drop, space hard-drop, q quit.

About

► Tetris in the terminal, written in C.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages