diff --git a/clients/web/assets/style.css b/clients/web/assets/style.css
index 38acbf0..1e0406b 100644
--- a/clients/web/assets/style.css
+++ b/clients/web/assets/style.css
@@ -2412,7 +2412,7 @@ a:hover { text-decoration: underline; }
}
@media (min-width: 920px) {
.controls {
- max-width: 200px;
+ width: 200px;
}
}
diff --git a/clients/web/src/game/components/board.rs b/clients/web/src/game/components/board.rs
index b614789..e97f077 100644
--- a/clients/web/src/game/components/board.rs
+++ b/clients/web/src/game/components/board.rs
@@ -327,7 +327,16 @@ fn free_mode_dests_for(
if dest >= 1 && dest <= 24 {
let d = dest as u8;
if !opp_present(d) {
- dests.push(d);
+ if d == 13 && is_white && displayed_value(board, staged, is_white, 12) < 2 {
+ // prise de coin par puissance for white
+ dests.push(12)
+ } else if d == 12 && !is_white && displayed_value(board, staged, is_white, 13) > -2
+ {
+ // prise de coin par puissance for black
+ dests.push(13)
+ } else {
+ dests.push(d);
+ }
}
} else if all_in_exit {
dests.push(0); // exit
diff --git a/clients/web/src/game/components/game_screen.rs b/clients/web/src/game/components/game_screen.rs
index e04e8c4..46f9deb 100644
--- a/clients/web/src/game/components/game_screen.rs
+++ b/clients/web/src/game/components/game_screen.rs
@@ -94,19 +94,22 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView {
cmd_tx_effect
.unbounded_send(NetCommand::Action(PlayerAction::Move(m1, m2)))
.ok();
+ staged_moves.set(vec![]);
+ selected_origin.set(None);
+ prev_staged_len.set(0);
} else {
let specific_err = rules.moves_allowed(&(vm1, vm2)).err();
move_error.set(Some(specific_err));
+ // Keep staged_moves intact so pieces stay in place until Retry is clicked.
}
} else {
cmd_tx_effect
.unbounded_send(NetCommand::Action(PlayerAction::Move(m1, m2)))
.ok();
+ staged_moves.set(vec![]);
+ selected_origin.set(None);
+ prev_staged_len.set(0);
}
-
- staged_moves.set(vec![]);
- selected_origin.set(None);
- prev_staged_len.set(0);
}
});
@@ -457,7 +460,11 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView {
{msg}
}