When Quentin Neill posted his tetrix game to Usenet in 1989, I grabbed a copy so I could port it to the Atari ST. When I switched to MS-DOS, I ported it there, then I ported it further on to Linux when Pell was switched over to Unix. But this code is the original Atari ST port.
`This is a Unix SysV implementation of a game that appeared on comp.binaries.amiga a while ago. The author, Quentin Neill, saw it on an amiga here at work, and ported it to curses (on his own time, of course ;-) ).
`I’m not too sure about the history of tetrix. Someone said that the game originated in Russia, and that it is quite old. We became enthralled with the game on an Amiga, almost to the point of addiction. That version had some documentation, but I never had the chance to read it - I only played. I conidered writing a version in machine language for my Franklin junker at home, but settled on a C implementation for unix machines.
`The object of the game is to keep the board clear for as long as possible. Pieces consisting of four blocks (hence the name TETRix) in the seven possible arrangements are sent down one at a time. The player’s job is to find the best fit for the piece in the pile of blocks that have already fallen. He can rotate each piece and move it from side to side. If the piece just played causes a complete row of blocks, that row is erased and all blocks above it move down one row. Points are awarded for completed rows - more for rows higher up on the board. A piece may be dropped from a height for additional points when the player feels it is oriented correctly. The game is over when no more pieces can be formed at the top of the board.
`There is one variable INIT_PAUSE in tet.c that compensates for different machine speeds. Set this higher if tetrix screams, and the time between each piece’s movement will lengthen. Set it lower if it crawls along too slowly. On a Tower 32/800 with about 45 users on a busy day, we do well with the value set at about 300. On a Tower 32/200 with one user, the value was set at 1500.
Good luck! Quentin Neill