diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-11-24 10:30:45 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-11-24 10:30:45 -0500 |
commit | 810d2de21f4c47d5f263678c274ae915702d247f (patch) | |
tree | 5dd8fad41503d196045a278df607cbbecbbc7d1e /webapp/src/components/game.rs | |
parent | e732b64fa6881cf25fd353edff4fd76c839e0c8b (diff) |
Add `TableView` for representing player hands in the app
Diffstat (limited to 'webapp/src/components/game.rs')
-rw-r--r-- | webapp/src/components/game.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/src/components/game.rs b/webapp/src/components/game.rs index 02774e7..9511eb2 100644 --- a/webapp/src/components/game.rs +++ b/webapp/src/components/game.rs @@ -24,6 +24,7 @@ pub fn game() -> Html { let state = state.clone(); Callback::from(move |card| { if let GameState::Play { + dealer, playing_deal, contract, bidding, @@ -33,6 +34,7 @@ pub fn game() -> Html { match playing_deal.play(card) { Err(err) => error!("Could not play card: {:?}", err), Ok(DealInPlayResult::InProgress(playing_deal)) => state.set(GameState::Play { + dealer, playing_deal, contract, bidding, @@ -52,6 +54,7 @@ pub fn game() -> Html { Callback::from(move |(contract, bidding)| { state.set(match contract { Some(contract) => GameState::Play { + dealer, playing_deal: DealInPlay::new(dealer, deal.clone()), contract, bidding, @@ -69,6 +72,7 @@ pub fn game() -> Html { } } GameState::Play { + dealer, playing_deal, contract: _, bidding: _, |