Skip to main content

Simply play connect 4.

Project description

This module provides a backend for the two048 game.

Find its documentation at https://two048.readthedocs.org/en/latest/. Not really useful, the code is simple you can check it directly.

Install it with : pip install two048

Use it with :

from two048 import Two048

game = Two048()

while not game.is_over():
    print(game)
    direction = input("Choose a direction (up/down/right/left): ")
    game.play(direction)

You can easily create an interface using this module. game.play() return a list of all the tile movements, so you can easily animate them.

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

two048-1.0.2.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

two048-1.0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file two048-1.0.2.tar.gz.

File metadata

  • Download URL: two048-1.0.2.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for two048-1.0.2.tar.gz
Algorithm Hash digest
SHA256 79f301917703c9d0cd857cb279af63d8ec6e83a981679d824e2a63c95aa664d9
MD5 e44bf7ad9384ceeb4d6c6a094d817ed9
BLAKE2b-256 ff21a6921b7c3c5acf9840200e14ba82b21939f2dfbc395de816788d4b9ba48b

See more details on using hashes here.

File details

Details for the file two048-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: two048-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for two048-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 09e28487cd7221cf8486df007d300ba9b8e41993103c973f03104c027e6dc7cd
MD5 96a73c9b1ca1c30ffe7a97627afe35c8
BLAKE2b-256 d62f35efbeabdbd58b18dfa952e136f055d071321fa0a180ba1390b8d13ce32a

See more details on using hashes here.

Supported by

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