Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hvuhsg/clientwars
https://github.com/hvuhsg/clientwars
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hvuhsg/clientwars
- Owner: hvuhsg
- License: mit
- Created: 2021-01-10T20:30:48.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-03T10:53:41.000Z (over 3 years ago)
- Last Synced: 2024-10-05T13:45:17.496Z (about 1 month ago)
- Language: Python
- Size: 38.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ClientWars
#### War game, but for programmers.
#### [register now](https://game.qwhale.ml)
Python Library for playing in ServerWars Game.
### Install
```shell script
pip3 install -U ClientWars
```### Example code:
```python
from client_wars import Gamegame = Game("")
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 examplegame.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](https://github.com/hvuhsg/ClientWars/wiki)