Show own captured and scopa counts in game view

This commit is contained in:
2026-09-18 01:17:26 +00:00
parent 5dc3f4cb17
commit 5b9e998739
2 changed files with 12 additions and 3 deletions
+7 -3
View File
@@ -247,9 +247,10 @@ fn table_view(
let hand_number = game.hand_number; let hand_number = game.hand_number;
let target_score = game.target_score; let target_score = game.target_score;
let hand = player_for_seat(&game, viewer_seat) let viewer = player_for_seat(&game, viewer_seat);
.and_then(|p| p.hand) let my_captured = viewer.as_ref().map(|p| p.captured_count).unwrap_or(0);
.unwrap_or_default(); let my_scope = viewer.as_ref().map(|p| p.scope).unwrap_or(0);
let hand = viewer.and_then(|p| p.hand).unwrap_or_default();
let current_selection = selected.get_clone(); let current_selection = selected.get_clone();
let hand_cards = hand let hand_cards = hand
.into_iter() .into_iter()
@@ -301,6 +302,9 @@ fn table_view(
} }
(right) (right)
div(class="seat-bottom") { div(class="seat-bottom") {
div(class="seat-stats own-stats") {
(my_captured) " captured · " (my_scope) " scope"
}
div(class="hand") { (hand_cards) } div(class="hand") { (hand_cards) }
(hint) (hint)
} }
+5
View File
@@ -310,6 +310,11 @@ table.matches td.lost {
margin-top: auto; margin-top: auto;
} }
/* The viewer's own stats sit above the hand; no flex context here. */
.seat-bottom .seat-stats {
margin-bottom: 0.35rem;
}
.center { .center {
grid-area: center; grid-area: center;
display: flex; display: flex;