tetris

A terminal interface for Tetris

OTHER License

Stars
877

Bot releases are hidden (Show)

tetris - Add toggle for drop preview Latest Release

Published by samtay about 5 years ago

Added the CLI option -n|--no-preview to turn off the hard drop preview cells.

tetris - Add pause feature

Published by samtay almost 6 years ago

The only functional change is adding a pause feature. Aside from that, I bumped up the Stack LTS to 13.0 (GHC 8.6.3) and refactored to a MonadState style for game computation.

tetris - Improve CLI options and features

Published by samtay over 7 years ago

Added legitimate CLI options:

tetris - the iconic game right in your terminal

Usage: tetris ([-a|--ascii-only] | [-p|--preview-chars CHARS])
              [-l|--level LEVEL] [--high-score]

Available options:
  -h,--help                Show this help text
  -a,--ascii-only          Use '[]' as hard drop preview cell instead of '◤◢'
  -p,--preview-chars CHARS Custom two character preview cell
  -l,--level LEVEL         Specify level (unspecified results in prompt)
  --high-score             Print high score and exit

The main purpose of this release was to help people with terminals that don't handle my choice of unicode characters very well. This way a simple -a flag will sub in [] as a preview, or custom characters can be used as well. This prompted a nice-to-have -l level option so you can skip the first prompt.

And I got around to saving high score. Not a complete leaderboard with name entry, just a single highest score is saved for the user playing Tetris, so you can get a pat on the back when you break a new record.

And I moved from tuples to Linear.V2 since that's the proper datatype when dealing with points in space.

tetris - Fix hard drop

Published by samtay over 7 years ago

Disallow shifting after a hard dropped brick has landed.

tetris - Initial release

Published by samtay over 7 years ago

Basic functionality