Skip to main content

2048 in your terminal

Project description

Build status Coverage status Pypi package

term2048 is a terminal-based version of 2048.

https://github.com/bfontaine/term2048/raw/master/img/term2048.png

Install

pip install term2048

To upgrade a previous installation, use:

pip install -U term2048

To install via snap:

sudo snap install term2048

Install from source

git clone https://github.com/bfontaine/term2048.git && cd term2048
[sudo] python setup.py install

Play

term2048

Then use arrow keys to move. VI keys (h,j,k,l) are also supported.

Use -h to check the list of available options, and --rules for the game rules. Press <space> at any time during the game to pause it. You can resume it later using term2048 --resume.

Tests

Clone this repo, then:

[sudo] make deps
make check

Note: while term2048 should work on Windows, tests are meant to run on UNIX-like OSes and term2048.keypress-related tests may fail on Windows.

Contributions

  • --version flag added by @aminb

  • --rules flag added by @cardern

  • Short -r and -v flags added by @yankuangshi

  • Resume feature added by @pravj

  • Snap installation method added by @LaughingLove

v0.2.0

  • Python 2.6 and 3.x support by @shaunduncan

  • Tests instructions fixed by @olafleur

  • Spawn probabilities fixed by @frankh

  • Colors improved by @idosch

  • hjkl keys support by @aminb

  • Windows support by @valtron

  • AZ mode by @JosephRedfern

  • The first file-related tests were added by @taeram

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

term2048-0.2.7.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

term2048-0.2.7-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file term2048-0.2.7.tar.gz.

File metadata

  • Download URL: term2048-0.2.7.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4

File hashes

Hashes for term2048-0.2.7.tar.gz
Algorithm Hash digest
SHA256 8163d5dddb1384d35b84627751c55c5f011618fe211726b6fc51a2992378b669
MD5 6c82e886589136fb896c4fa7627d906f
BLAKE2b-256 530a911a042756afca4c826ed168665eb5c954416f1e58837430511951c373c9

See more details on using hashes here.

File details

Details for the file term2048-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: term2048-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.4

File hashes

Hashes for term2048-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c31ad7f5d28a55ae70bdf14126ff9f6f506c2ce69d6fb8181aad40db4d694232
MD5 0c46573bce1a4b1118589372c1d32a31
BLAKE2b-256 8d5b24df1bd49fe2bafd3358a4a09e19f04c4430551ce16ed63255438dd40c0e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page