terminal2048: 2048 in the terminal
This is a small implementation of Gabriele Cirulli's 2048 game in the terminal using Python. I wrote it to learn about using the curseslibrary in Python. I learned enough about curses to prefer the much smoother blessed library instead, so that's what's used here.
(You might also be interested in a more common package, term2048, also available at PyPI.)
Installation
pip install terminal2048
Running terminal2048
Once you've installed the package, you can run the game from the terminal:
terminal2048
Use terminal2048 --help to print help options:
usage: terminal2048 [-h] [-w WIDTH] [--height HEIGHT] [-s {S,M,L,XL}] [--start_value START_VALUE]
2048 game in the terminal. Inspired by https://play2048.co/
options:
-h, --help show this help message and exit
-w WIDTH, --width WIDTH
Width of the board (default: 4)
--height HEIGHT Height of the board (default: 4)
-s {S,M,L,XL}, --size {S,M,L,XL}
Board size (options: S, M, L, XL; default: M)
--start_value START_VALUE
Highest starting tile value (default: 4)
Compatibility
I've only run this on MacOS so far, and the terminal management is pretty naive. Let me know if you have issues on a given OS or terminal setup.
Contact & bug reports
Bug reports and pull requests are welcome! Feel free to contact me on Github or by email at evan_jones@mac.com.)
Metadata
Release files for terminal2048 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| terminal2048-0.1.0.tar.gz | 4.6 kB | Without provenance | Details for terminal2048-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| terminal2048-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for terminal2048-0.1.0-py3-none-any.whl |
Total release size: 10.0 kB
Release files / terminal2048-0.1.0.tar.gz
| Download URL | terminal2048-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d70b8bb11484c31613857e341940aee740adf7aa008d94c6035b2eb8d30cd4c
|
|
BLAKE2b-256 checksum How to use checksums |
562f7433a05f42464cae135d8f1a81e88c4d49d53742076b7a767bdf331beaf8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Darwin/22.4.0
|
Release files / terminal2048-0.1.0-py3-none-any.whl
| Download URL | terminal2048-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cc7ec9b5e1fec492b8e1c0deffa24dd3734d758455d8c4573e445c59d863a92
|
|
BLAKE2b-256 checksum How to use checksums |
022f01e6e920de186b37dda01100b599c4d2b77d1936667e43bd0519363a78f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.10.12 Darwin/22.4.0
|
Security for terminal2048 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.