43

Tinytetris – 80x23 Terminal Tetris

 5 years ago
source link: https://www.tuicool.com/articles/hit/IRbE7fa
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

tinytetris

80x23 terminal tetris!

RRr263Q.gif

tinytetris.cpp

This is the 80x23 version. You control it with a (left), d (right), w (rotate), s (drop), and q (quit). It depends on curses.h (so you'll need to compile with -lcurses , and install curses if you don't already have it) and requires C++11.

tinytetris-commented.cpp

This one is almost identical to tinytetris.cpp , but not minified, and with some comments to make it easier to read (but it's still tricky to read in certain parts).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK