summaryrefslogtreecommitdiff
path: root/protocol/src/simple_bots.rs
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-12-22 20:35:49 -0500
committerKjetil Orbekk <kj@orbekk.com>2022-12-22 20:36:35 -0500
commit573749cb2055d9e3e6897f73d6879773d738faee (patch)
tree84238c93441bdef3e097b82ce37348d8c7c766ee /protocol/src/simple_bots.rs
parent93faa3894907508933a43173d829b15fd32cbc44 (diff)
Add playing view showing declarer and dummy hands
Diffstat (limited to 'protocol/src/simple_bots.rs')
-rw-r--r--protocol/src/simple_bots.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocol/src/simple_bots.rs b/protocol/src/simple_bots.rs
index 501f1f4..8965254 100644
--- a/protocol/src/simple_bots.rs
+++ b/protocol/src/simple_bots.rs
@@ -67,6 +67,9 @@ mod tests {
let south_state =
PlayStatePlayerView::from_play_state(&play_state, Player::South);
+ assert!(!play_state.playing_deal.is_dummy_visible());
+ assert!(south_state.dummy.is_none());
+
let card1 = (RandomPlayingBot {}).play(&south_state).await;
info!("South state: {south_state:#?}");
@@ -79,6 +82,9 @@ mod tests {
let west_state =
PlayStatePlayerView::from_play_state(&play_state, Player::West);
+ assert!(play_state.playing_deal.is_dummy_visible());
+ assert!(west_state.dummy.is_some());
+
let card2 = (RandomPlayingBot {}).play(&west_state).await;
info!("West state: {west_state:#?}");