Skip to content

Python Client

Alan Luo edited this page Sep 14, 2020 · 3 revisions

Download

You can download the Python client from here. The client is writing in Python 3.

Libraries

Requests

The Python client needs a Python HTTP library called Requests. Please follow the instruction here to install it.

Usage

python client.py --name NAME [--stones INIT_STONES] [--id SESSION_ID] [--url BASE_URL] [--auto]

Parameters

Name Type Required Description
NAME String Yes Player's name
INIT_STONES Integer No Number of stones to start
SESSION_ID Integer No The id of the session that you want to join
BASE_URL String No If you run the server on your local machine, please change the base url here
auto No Play the game automatically

Example

To start a new session:

python client.py --name Alan --stones 100

To join a session:

python client.py --name Bob --id 21
Clone this wiki locally