## Judge

The judge is written in Rust. To run it, first install Rust as described in https://www.rust-lang.org/tools/install. Then simply navigate to the judge directory and run

```
cargo run -- --command1 "PATH1" --name1 "NAME1" --command2 "PATH2" --name2 "NAME2" --centralness "CENTRALNESS" --size "SIZE" --icing "ICING" --pours "POURS"
```

Replace the capitalized words with your arguments. The variables can take the following values:

- `PATH1` / `PATH2`: paths to the executables for your bots. These paths can be absolute or relative to the judge folder. For example, if your bot is in `judge/mybot.exe`, replace `PATH1` with `mybot.exe`. 
In case of a python bot you specify the path to the python executable followed by a space followed by the path to your script. 
- `NAME1` / `NAME2`: names of the two bots which should be shown in the visualization
- `CENTRALNESS`: determines the value of the centralness parameter as described in the task statement. Can be one of `spread`, `medium`, `concentrated`
- `SIZE`: determines the value of the cake size parameter as described in the task statement. Can be one of `small`, `medium`, `large`
- `ICING`: determines the value of the icing parameter as described in the task statement. Can be one of `little`, `medium`, `much`
- `POURS`: determines the value of the pours parameter as described in the task statement. Can be one of `few`, `medium`, `many`

You can also run `cargo run -- --help` for help.

If you want to visualize the game with the visualization, pass the `--visualization-output` flag as well. You can specify a path to a file where the judge should write some logs to, which the visualization can then visualize.

If you want a more verbose judge output, you can pass the `--verbose` flag which will make it print what both bots did in each pour as well as some additional information.

## Visualization

To run the visualization, simply open `index.html` in the `visualization` folder in any browser. It will provide a file input where you can select a file with logs which the visualization should visualize. This file is usually one created by the judge with the `--visualization-output` flag as described above.