# Chess Reputation
## Reputation data
[ELO Rating system](https://en.wikipedia.org/wiki/Elo_rating_system)
DataType:
```rust=
struct GameResult {
timestamp: Timestamp,
winner_index: u8, // index of the winner inside the participants array
participants: Vec<AgentPubKey>,
num_of_moves: usize
}
struct SignedGameResult {
result: GameResult,
signatures: Vec<Signatures>
}
```
SignedGameResult is a self-validating data type.
## Reputation score
This would be an example for a computation of a player's score in one community:
$$
\ Score = 1000 + WINNED GAMES * 4 - LOSED GAMES * 3
$$
"1000", "4" and "3" could be configurable parameters.
It would be cool to take into account the level of the rival to know how many points to add or substract, but right now I'm not finding a way of doing that.