Skip to content

Commit

Permalink
Added more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikwilkowski committed May 3, 2024
1 parent 2eddded commit 79fd7b0
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Coup CLI

# Coup

<p align="center"><img width="764" src="assets/coup.png"></p>

Expand Down Expand Up @@ -119,6 +118,25 @@ The default implementation are the methods of the `StaticBot` which only takes
`Income` and is forced to coup by the engine if it accumulated more or equal to
10 coins. It does not challenge, counter or counter challenge.

The simplest way to build a bot by falling back to static behavior for each method would be:

```rust
use coup::bot::BotInterface;

pub struct MyBot;

impl BotInterface for MyBot {
fn get_name(&self) -> String {
String::from("MyBot")
}
}
```

_(This is what the `StaticBot` is.)_

From there you can choose which, if not all, of the below methods you change to
make this bot your own.

### Methods of the bot

The methods of `BotInterface` that will define the behavior of your bot.
Expand Down

0 comments on commit 79fd7b0

Please sign in to comment.