Skip to main content

War game, but for programmers.

Project description

ClientWars

War game, but for programmers.

Python Library for playing in ServerWars Game.

Install

pip3 install -U ClientWars

Example code:

from client_wars import Game

game = Game("<TOKEN>")


def turn(game):
    conquers = game.conquerable_tiles()
    """
    The method conquerable_tiles return's list of per of neighbors tiles when your tile has more power
    >>> conquers
    >>> [(your_tile, enemy_tile), ...]
    """

    if not conquers:
        print("No conquers")
        return  # Here you can move reinforcements to the outside tiles for example

    game.move(conquers[0][0], conquers[0][1])
    print("Conquer", conquers[0][1])

game.set_turn_method(turn)
game.run()

Usage

python3 your_code.py

Wiki

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

ClientWars-1.4.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

ClientWars-1.4.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ClientWars-1.4.1.tar.gz.

File metadata

  • Download URL: ClientWars-1.4.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for ClientWars-1.4.1.tar.gz
Algorithm Hash digest
SHA256 a6e7e512e1da6abb1e53519c84d958e7b037e84228a27e91f02e31ddd3ec68f3
MD5 cfeec9b64fdbf52a447e0fc84b2b4a72
BLAKE2b-256 c0c894559da33cc9720f53070f49adf249ba58a015459f6e1440311ae10504ca

See more details on using hashes here.

File details

Details for the file ClientWars-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: ClientWars-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for ClientWars-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee12dba2f06ea9f9d4965c78fda97a76033d401543a2653194ed5c02e620db59
MD5 58f82082eba0c0e384208837466acb49
BLAKE2b-256 4bd1cd9095daeb6742243795975d866a93402ea5f5d41bba63770425cb85244b

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