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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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