This is an implementation of he 2048 Game. I have written this as a means for me to try out and learn the Python Textual UI framework.
Clone this repository. Ensure that you have Python3 installed. I recommend setting up a Python Virtual Environment. Then pip install -r requirements.txt.
I have tested it with Python 3.10.12, although any version of Python 3 should be fine.
./2048.py
The object of the game is to keep going for as long as possible and thus get the highest possible score - i.e. that there is at least one valid move. Moves are simply Up, Down, Left, or Right. There is a valid move if there is at least one empty cell, or if there are two adjacent cells (horizontally or vertically) that have the same value and thus can be combined.
Movement is via WASD keys, HJKL keys, or the Arrow Keys.
Points are scored for merged cells.
Enjoy!