Thanks to visit codestin.com
Credit goes to docs.rs

Crate coup

Crate coup 

Source
Expand description

§Coup

This is an engine for the popular card game coup.

use coup::{
    bots::{HonestBot, RandomBot, StaticBot},
    Coup,
};

let mut coup_game = Coup::new(vec![
    Box::new(StaticBot),
    Box::new(HonestBot),
    Box::new(RandomBot),
    Box::new(StaticBot),
    Box::new(RandomBot),
    Box::new(HonestBot),
]);

// You can play a single game
coup_game.play();

// Or you can play 5 games (or more)
coup_game.looping(5);

Modules§

bot
The bot trait BotInterface and a couple types that help with the bot implementation.
bots
A collection of pre-built bots to test with.

Structs§

Coup
The Coup game engine.

Enums§

Action
Actions that can we taken with a Card you have.
Card
One of the five cards you get in the game of Coup.
Counter
Counters are played if something happens that can be countered with a Card you have.
History
A collection on all possible moves in the game for bots to analyze.

Type Aliases§

Score
The score of the game for all bots.