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)
| File | Size | Uploaded | |
|---|---|---|---|
| ClientWars-1.4.1.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|