update README
This commit is contained in:
parent
500061375c
commit
5e560b23f8
2 changed files with 25 additions and 0 deletions
|
@ -17,5 +17,6 @@ Project layout:
|
||||||
- `planetwars-server`: rust webserver
|
- `planetwars-server`: rust webserver
|
||||||
- `planetwars-matchrunner`: code for running matches
|
- `planetwars-matchrunner`: code for running matches
|
||||||
- `planetwars-rules`: implements the game rules
|
- `planetwars-rules`: implements the game rules
|
||||||
|
- `planetwars-client`: for running your bot locally
|
||||||
- `web/pw-server`: frontend
|
- `web/pw-server`: frontend
|
||||||
- `web/pw-visualizer`: code for the visualizer
|
- `web/pw-visualizer`: code for the visualizer
|
||||||
|
|
24
planetwars-client/README.md
Normal file
24
planetwars-client/README.md
Normal file
|
@ -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
|
Loading…
Reference in a new issue