diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2022-09-22 09:18:28 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2022-09-22 09:18:28 -0400 |
commit | 6a11eedc3df00c88bdf5fcb004f2afd4fa3dc49f (patch) | |
tree | 4bea89265ec0bd4126e020d1106681d92345387a /webapp/src/components | |
parent | 030b45c000210b153b5ef224ddcaa668de763638 (diff) |
Rename bridge_engine names for consistency
Diffstat (limited to 'webapp/src/components')
-rw-r--r-- | webapp/src/components/game.rs | 10 | ||||
-rw-r--r-- | webapp/src/components/trick_in_play.rs | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/webapp/src/components/game.rs b/webapp/src/components/game.rs index accdd33..91b3022 100644 --- a/webapp/src/components/game.rs +++ b/webapp/src/components/game.rs @@ -1,4 +1,4 @@ -use crate::bridge_engine::{self, Contract, Player, PlayingDeal, PlayingDealResult}; +use crate::bridge_engine::{self, Contract, Player, DealInPlay, DealInPlayResult}; use crate::card; use crate::card::Deal; use crate::card::Suit; @@ -20,7 +20,7 @@ enum GameState { _bidding: bridge_engine::Bidding, }, Play { - playing_deal: PlayingDeal, + playing_deal: DealInPlay, contract: Contract, bidding: bridge_engine::Bidding, }, @@ -72,12 +72,12 @@ pub fn game() -> Html { info!("Card clicked: {}", card); match playing_deal.play(card) { Err(err) => error!("Could not play card: {:?}", err), - Ok(PlayingDealResult::InProgress(playing_deal)) => state.set(GameState::Play { + Ok(DealInPlayResult::InProgress(playing_deal)) => state.set(GameState::Play { playing_deal, contract, bidding, }), - Ok(PlayingDealResult::PlayFinished(tricks)) => todo!(), + Ok(DealInPlayResult::PlayFinished(tricks)) => todo!(), }; } }) @@ -92,7 +92,7 @@ pub fn game() -> Html { Callback::from(move |(contract, bidding)| { state.set(match contract { Some(contract) => GameState::Play { - playing_deal: PlayingDeal::new(dealer, deal.clone()), + playing_deal: DealInPlay::new(dealer, deal.clone()), contract, bidding, }, diff --git a/webapp/src/components/trick_in_play.rs b/webapp/src/components/trick_in_play.rs index 086a422..c034d20 100644 --- a/webapp/src/components/trick_in_play.rs +++ b/webapp/src/components/trick_in_play.rs @@ -1,5 +1,5 @@ use yew::prelude::*; -use crate::bridge_engine::PlayTurn; +use crate::bridge_engine::TurnInPlay; use crate::components::Card; #[function_component(TrickInPlay)] @@ -19,5 +19,5 @@ html! { #[derive(PartialEq, Properties, Clone)] pub struct TrickInPlayProps { - pub in_progress: PlayTurn, + pub in_progress: TurnInPlay, } |