Sunday, May 22, 2011

Tetris in Command Line

Ha ha! That's really funny. I never think about even sed can be used to write games such as Tetris!

I just wondered how to play Tetris in command line. Googled it and found several results with source code. There are three of them I've played:
  1. Tetris for the command line with Python Curses (in Python)
  2. Play Tetris at the command line (in sed)
  3. tt: Tetris for Terminals (in C)
To compile tt, you may need to install ncurses, or you will get the following errors:
utils.c:32:20: error: curses.h: No such file or directory
utils.c:33:18: error: term.h: No such file or directory

In Ubuntu, just install the ncurses-dev.

1 comment:

  1. Thanks for providing good information,Thanks for your sharing python Online Training

    ReplyDelete