summaryrefslogtreecommitdiff
path: root/protocol/src/bridge_engine.rs
diff options
context:
space:
mode:
Diffstat (limited to 'protocol/src/bridge_engine.rs')
-rw-r--r--protocol/src/bridge_engine.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/protocol/src/bridge_engine.rs b/protocol/src/bridge_engine.rs
index 293b205..4cdb286 100644
--- a/protocol/src/bridge_engine.rs
+++ b/protocol/src/bridge_engine.rs
@@ -469,6 +469,16 @@ pub struct Contract {
pub modifier: ContractModifier,
}
+impl Contract {
+ pub fn dummy(&self) -> Player {
+ self.declarer.many_next(2)
+ }
+
+ pub fn leader(&self) -> Player {
+ self.declarer.many_next(3)
+ }
+}
+
impl fmt::Display for Contract {
fn fmt(
&self,
@@ -844,8 +854,7 @@ impl PlayStatePlayerView {
Some(
play_state
.contract
- .declarer
- .many_next(2)
+ .dummy()
.get_cards(&play_state.playing_deal.deal)
.clone(),
)