summaryrefslogtreecommitdiff
path: root/protocol/src/simple_bots.rs
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/src/simple_bots.rs')
-rw-r--r--protocol/src/simple_bots.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocol/src/simple_bots.rs b/protocol/src/simple_bots.rs
index ed1cd14..45d1a5b 100644
--- a/protocol/src/simple_bots.rs
+++ b/protocol/src/simple_bots.rs
@@ -46,13 +46,13 @@ impl PlayingBot for RandomPlayingBot {
#[cfg(test)]
mod tests {
use std::str::FromStr;
+ use crate::move_result::MoveResult;
use super::*;
use crate::{
bridge_engine::{
Bidding, BiddingState, BiddingStatePlayerView, Contract,
- ContractLevel, ContractModifier, Deal, PlayState, PlayStateResult,
- Player, Raise,
+ ContractLevel, ContractModifier, Deal, PlayState, Player, Raise,
},
card::Suit,
};
@@ -75,8 +75,8 @@ mod tests {
info!("South state: {south_state:#?}");
let play_state = match play_state.play(card1).unwrap() {
- PlayStateResult::InProgress(p) => p,
- PlayStateResult::PlayFinished(_) => {
+ MoveResult::Current(p) => p,
+ MoveResult::Next(_) => {
panic!("game should not be over")
}
};
@@ -92,8 +92,8 @@ mod tests {
assert_eq!(card1.suit(), card2.suit());
let _play_state = match play_state.play(card2).unwrap() {
- PlayStateResult::InProgress(p) => p,
- PlayStateResult::PlayFinished(_) => {
+ MoveResult::Current(p) => p,
+ MoveResult::Next(_) => {
panic!("game should not be over")
}
};
@@ -159,8 +159,8 @@ mod tests {
async fn play_until_completion() {
crate::tests::test_setup();
let bot = RandomPlayingBot {};
- let mut result = PlayStateResult::InProgress(example_play_state());
- while let PlayStateResult::InProgress(play_state) = result {
+ let mut result = MoveResult::Current(example_play_state());
+ while let MoveResult::Current(play_state) = result {
info!("Play state: {play_state:#?}");
let player_state = PlayStatePlayerView::from_play_state(
&play_state,