summaryrefslogtreecommitdiff
path: root/protocol/src/bot.rs
blob: a85fda03ab291e5a713f73e1a8341fe16409dcd7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use async_trait::async_trait;

use crate::{
    bridge_engine::{Bid, BiddingStatePlayerView, PlayStatePlayerView},
    card::Card,
};

#[async_trait]
pub trait BiddingBot {
    async fn bid(&self, bidding: &BiddingStatePlayerView) -> Bid;
}

#[async_trait]
pub trait PlayingBot {
    // TODO: May need a PlayStateBotView here to expose past cards played,
    // to avoid the need for stateful bots.
    async fn play(&self, play_state: &PlayStatePlayerView) -> Card;
}