summaryrefslogtreecommitdiff
path: root/protocol/src/bot.rs
blob: 24495c88fcd0c3d3931d46aef517df8bbb560180 (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::{BiddingStatePlayerView, PlayStatePlayerView},
    card::Card, actions::Bid,
};

#[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;
}