Yet another terminal-based implementation of 2048 game, written in python & ncurses.
$ python3 2048.py
or
$ chmod +x 2048.py
$ ./2048.py
- Movement: ← ↑ → ↓ or h j k l
- Restart: r
- Quit: q
- Python >= 3.6 (tested on Python 3.6.6)
- Curses module for python (should be included in the python's standard library on most Unix-like systems)
- Terminal with 256 colors support
Feel free to adjust settings in config.py.
Your terminal's size does matter. The game is capable of running in 2 modes: Large or Small; it's Large by default. But if your terminal is not large enough, the game tries to run in Small mode. You can override the default behaviour by simply passing the appropriate parameter into the Game constructor:
...
game = Game(config.Mode.Small)
...
2048-curses is licensed under the MIT license.