Linux only, nostd, in about 2000 loc.
- ← move piece once to the left
- → move piece once to the right
- ↓ toggle soft drop (can't be held because terminals don't support release events)
- X rotate piece
- ESC pause game
Starting with -l
or --level
followed by a number starts the game at that level (max 999).
To build you'll need:
- Make
- GNU As (doesn't have to be gnu, but must support GAS syntax)
- ld
You should already have all that on any linux system
make build
Built binary will be called xttrs
. The code doesn't link against any library so you should be able to run it from anywhere.
The best score per user is stored in $XDG_DATA_HOME/xttrs/best_score
(defaults to $HOME/.local/share/xttrs/best_score
).
The whole codebase is a huge mess with no conventions, probably a lot of stupid things, I'm still learning.