From 5e560b23f8305c3a700ef722ea3ba278bc30fbca Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 23 Jul 2022 00:38:44 +0200 Subject: [PATCH] update README --- README.md | 1 + planetwars-client/README.md | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 planetwars-client/README.md diff --git a/README.md b/README.md index c7d98af..89c5d66 100644 --- a/README.md +++ b/README.md @@ -17,5 +17,6 @@ Project layout: - `planetwars-server`: rust webserver - `planetwars-matchrunner`: code for running matches - `planetwars-rules`: implements the game rules +- `planetwars-client`: for running your bot locally - `web/pw-server`: frontend - `web/pw-visualizer`: code for the visualizer diff --git a/planetwars-client/README.md b/planetwars-client/README.md new file mode 100644 index 0000000..bffee30 --- /dev/null +++ b/planetwars-client/README.md @@ -0,0 +1,24 @@ +# planetwars-client + +`planetwars-client` can be used to play a match with your bot running on your own machine. + +## Usage + +First, create a config `mybot.toml`: + +```toml +# Comand to run when starting the bot. +# Argv style also supported: ["python", "simplebot.py"] +command = "python simplebot.py" + +# Directory in which to run the command. +# It is recommended to use an absolute path here. +working_directory = "/home/user/simplebot" +``` + +Then play a match: `planetwars-client /path/to/mybot.toml opponent_name` + +## Building +- Obtain rust compiler through https://rustup.rs/ or your package manager +- Checkout this repository +- Run `cargo install --path .` in the `planetwars-client` directory \ No newline at end of file