don't move cards if submitted
This commit is contained in:
parent
79b512ad3c
commit
98fa49046a
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,7 @@ pub fn PlayingView() -> impl IntoView {
|
|||
// Toggle selected status of cards
|
||||
create_effect(move |_| {
|
||||
if card_clicked() != "".to_string()
|
||||
&& !submitted()
|
||||
&& submitted_cards().len() < game_meta().unwrap().black.1.into()
|
||||
{
|
||||
if let Some(clicked_card) = player_hand
|
||||
|
@ -114,6 +115,7 @@ pub fn PlayingView() -> impl IntoView {
|
|||
view! { <WhiteCard card_data=card /> }
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
|
||||
// Submit button
|
||||
|
@ -124,6 +126,7 @@ pub fn PlayingView() -> impl IntoView {
|
|||
view! { <p>"Card(s) submitted. Waiting for other players..."</p> }
|
||||
}
|
||||
>
|
||||
|
||||
<button type="button" on:click=submit_move.clone()>
|
||||
Submit
|
||||
</button>
|
||||
|
@ -154,6 +157,7 @@ pub fn PlayingView() -> impl IntoView {
|
|||
}
|
||||
}
|
||||
/>
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue