Skip to main content

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

Release files for ClientWars 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ClientWars 1.4.1
File Size Uploaded
ClientWars-1.4.1.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ClientWars 1.4.1
File Interpreter ABI Platform
ClientWars-1.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / ClientWars-1.4.1.tar.gz

Download URL ClientWars-1.4.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6e7e512e1da6abb1e53519c84d958e7b037e84228a27e91f02e31ddd3ec68f3
BLAKE2b-256 checksum
How to use checksums
c0c894559da33cc9720f53070f49adf249ba58a015459f6e1440311ae10504ca
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ClientWars-1.4.1-py3-none-any.whl

Download URL ClientWars-1.4.1-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ee12dba2f06ea9f9d4965c78fda97a76033d401543a2653194ed5c02e620db59
BLAKE2b-256 checksum
How to use checksums
4bd1cd9095daeb6742243795975d866a93402ea5f5d41bba63770425cb85244b
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.4.1 This release

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page