summaryrefslogtreecommitdiff
path: root/webapp/src/components/game.rs
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/game.rs')
-rw-r--r--webapp/src/components/game.rs37
1 files changed, 21 insertions, 16 deletions
diff --git a/webapp/src/components/game.rs b/webapp/src/components/game.rs
index d31433d..33fb5b7 100644
--- a/webapp/src/components/game.rs
+++ b/webapp/src/components/game.rs
@@ -47,22 +47,27 @@ pub fn game() -> Html {
html! {
<>
- <p>{ format!("Dealer: {:?}", *dealer) }</p>
- if let Some((contract, bidding)) = &*contract {
- { format!("Got contract {:?}. Bidding was {:?}", contract, bidding) }
- } else {
- <Bidding {on_contract} dealer={ *dealer } />
- }
- <p>{ "North" }</p>
- <Hand ..(*north).clone() />
- <p>{ "West" }</p>
- <Hand ..(*west).clone() />
- <p>{ "South" }</p>
- <Hand ..(*south).clone() />
- <p>{ "East" }</p>
- <Hand ..(*east).clone() />
- <p>{ "Controls" }</p>
- <button onclick={shuffle}>{ "Shuffle" }</button>
+ <div class="center">
+ <p>{ format!("Dealer: {:?}", *dealer) }</p>
+ if let Some((contract, bidding)) = &*contract {
+ { format!("Got contract {:?}. Bidding was {:?}", contract, bidding) }
+ } else {
+ <Bidding {on_contract} dealer={ *dealer } />
+ }
+ <button onclick={shuffle}>{ "Shuffle" }</button>
+ </div>
+ <div class="hand west">
+ <Hand ..(*west).clone() />
+ </div>
+ <div class="hand north">
+ <Hand ..(*north).clone() />
+ </div>
+ <div class="hand east">
+ <Hand ..(*east).clone() />
+ </div>
+ <div class="hand south">
+ <Hand ..(*south).clone() />
+ </div>
</>
}
}