weasel 0.11.0

A customizable battle system for turn-based games.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# User event

This example is a small program that shows how use user defined events and metrics.

First, we define our own `UserRules`, a custom event `MakePizza`. Then we create a `server` and fire two `MakePizza` events.\
Before exiting, the program prints to the terminal the json serialized content of the battle history.

Run the example with:
```
cargo run --example user-event --all-features
```

The program is implemented in two source code files:
- [rules.rs]rules.rs: rules definition (user rules, in particular).
- [main.rs]main.rs: manages the battle and creates a few events.