Port of https://github.com/samtay/tetris to the C programming language
  • C 99%
  • Makefile 1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-02 04:07:41 +00:00
.gitignore ignore tetris artifact 2026-11-01 22:31:23 +00:00
LICENSE add Sam Tay to LICENSE 2026-11-01 22:08:25 +00:00
main.c Update main.c 2026-11-02 04:07:41 +00:00
Makefile Upload files to "/" 2026-11-01 22:00:08 +00:00
README.md Update README.md 2026-11-01 22:07:40 +00:00
tetris.h bring back unicode ui 2026-11-02 03:24:22 +00:00
tetris_logic.c bring back unicode ui 2026-11-02 03:24:22 +00:00
tetris_ui.c fix prng seed, make preview shade lighter 2026-11-02 03:50:02 +00:00

cetris

cetris is a fork of samtay's terminal interface for Tetris that ports the code from Haskell Stack to the C programming language.

This port was designed to be very portable and rely on as little dependencies as possible, in order to make it usable on as many systems as possible with little to no modifications needed.

Differences (other than different language)

  • Blocks are rendered not as box characters but as square brackets ([])
    • The command argument to change this has been removed
  • Tetrimino shadows are rendered as hashtags (##)
    • The command argument to change this has been removed

Building

Because of its simplicity, you only really need one command:

make

If successful, you should have a tetris executable in the same directory.

Command-line arguments

  • -l, --level <N>: Start at level N (1-10)
  • -h, --help: Display help message