PROJECT DOSSIER // [TETRIS]VIEW SOURCEBACK TO PROJECTS →

01 // PROJECT AT A GLANCE

TETRIS

C

Eighties Tetris, in a terminal, with pieces defined by file.

Reproducing Tetris in a terminal window: pieces fall, stack up, and completed lines disappear. The shapes are not frozen in the code, they are described in files, which lets you invent your own pieces. A good part of the work is in fact invisible on screen: the subject requires a debug mode that must reprint, character for character, the key configuration and the contents of the pieces folder — and it counted for half the grade.

Tetris in ncurses with pieces loaded from .tetrimino files (dimensions, colour, shape), manual command-line option parsing, a complete debug mode, timed falling, full-line removal and a side panel with high score / level / timer.

PRIMARYC
DELIVERYTEAM RECORD
VERIFICATIONCriterion
SOURCEINSPECTOR READY
MEDIA ATTACHMENTS (Images, Photos, Videos)

03 // KEY OUTCOMES

  • Pieces entirely defined by file, validation included
  • A debug mode compliant with the subject, which carried half the grade
  • Full configuration through command-line options, parsed by hand

BEYOND THE BRIEF

  • Tetriminos entirely defined by external text files, with a dedicated parser (analyze_tetriminos.c): pieces can be added without recompiling
  • Remappable keys (manage_keys.c) instead of hard-coded arrows
  • A debug mode (debug_mode.c) that prints the retained options and the tetrimino contents before starting the game
  • ncurses colours per piece type (init_pair in init_screen.c)
  • On-the-fly terminal mode switching (modify_term.c) for non-blocking input

04 // SOURCE TREE

READING SOURCE…