diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2023-01-01 20:34:09 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2023-01-01 20:34:09 -0500 |
commit | d3fbefad9cf25786fb5f28f96eeceb65d0a8b35b (patch) | |
tree | 156a23b5c04b93d746ecf592971aefbcc127cfd2 /protocol/src/simple_bots.rs | |
parent | bb2ed3a2926384df063e476d10613fa310cd7ffa (diff) |
Split bridge_engine into a few separate modules
Diffstat (limited to 'protocol/src/simple_bots.rs')
-rw-r--r-- | protocol/src/simple_bots.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/protocol/src/simple_bots.rs b/protocol/src/simple_bots.rs index 182229f..3df50fb 100644 --- a/protocol/src/simple_bots.rs +++ b/protocol/src/simple_bots.rs @@ -5,8 +5,9 @@ use rand::{ }; use crate::{ + actions::Bid, bot::{BiddingBot, PlayingBot}, - bridge_engine::{Bid, BiddingStatePlayerView, PlayStatePlayerView}, + bridge_engine::{BiddingStatePlayerView, PlayStatePlayerView}, card::Card, }; @@ -45,14 +46,19 @@ impl PlayingBot for RandomPlayingBot { #[cfg(test)] mod tests { + use crate::{ + bridge_engine::SUIT_DISPLAY_ORDER, + card::RankOrder, + contract::{Contract, ContractLevel, ContractModifier, LevelAndSuit}, + core::{Deal, Player}, + move_result::MoveResult, + }; use std::str::FromStr; - use crate::{move_result::MoveResult, bridge_engine::SUIT_DISPLAY_ORDER, card::RankOrder}; use super::*; use crate::{ bridge_engine::{ - Bidding, BiddingState, BiddingStatePlayerView, Contract, - ContractLevel, ContractModifier, Deal, PlayState, Player, Raise, + Bidding, BiddingState, BiddingStatePlayerView, PlayState, }, card::Suit, }; @@ -118,7 +124,7 @@ mod tests { fn example_play_state() -> PlayState { let deal = example_deal(); - let raise1c = Raise { + let raise1c = LevelAndSuit { level: ContractLevel::One, suit: Some(Suit::Club), }; |