diff --git a/client_web/locales/fr.json b/client_web/locales/fr.json index df6a2b5..c760968 100644 --- a/client_web/locales/fr.json +++ b/client_web/locales/fr.json @@ -5,16 +5,16 @@ "connecting": "Connexion en cours…", "game_over": "Partie terminée", "waiting_for_opponent": "En attente de l'adversaire…", - "your_turn_roll": "À votre tour — lancez les dés", - "hold_or_go": "Tenir ou s'en aller ?", + "your_turn_roll": "Votre tour — lancez les dés", + "hold_or_go": "Tenir ou aller ?", "select_move": "Sélectionner le coup {{ n }} sur 2", "your_turn": "Votre tour", "opponent_turn": "Tour de l'adversaire", "room_label": "Salle : {{ id }}", "quit": "Quitter", "roll_dice": "Lancer les dés", - "go": "S'en aller", - "empty_move": "Mouvement impossible", + "go": "Aller", + "empty_move": "Coup vide", "you_suffix": " (vous)", "points_label": "Points", "holes_label": "Trous", @@ -26,17 +26,17 @@ "jan_true_hit_big": "Battage à vrai (grand jan)", "jan_true_hit_corner": "Battage coin adverse", "jan_first_exit": "Premier sorti", - "jan_six_tables": "Jan de six tables", - "jan_two_tables": "Jan de deux tables", - "jan_mezeas": "Jan de mézéas", + "jan_six_tables": "Six tables", + "jan_two_tables": "Deux tables", + "jan_mezeas": "Mezeas", "jan_false_hit_small": "Battage à faux (petit jan)", "jan_false_hit_big": "Battage à faux (grand jan)", - "jan_contre_two": "Contre jan de deux tables", - "jan_contre_mezeas": "Contre jan de mezeas", + "jan_contre_two": "Contre deux tables", + "jan_contre_mezeas": "Contre mezeas", "jan_helpless_man": "Dame impuissante", "play_vs_bot": "Jouer contre le bot", "vs_bot_label": "contre le bot", - "you_win": "Vous avez gagné !", + "you_win": "Vous gagnez !", "opp_wins": "{{ name }} gagne !", "play_again": "Rejouer" } diff --git a/client_web/src/components/game_screen.rs b/client_web/src/components/game_screen.rs index 6c3edec..1477d19 100644 --- a/client_web/src/components/game_screen.rs +++ b/client_web/src/components/game_screen.rs @@ -35,7 +35,10 @@ fn matched_dice_used(staged: &[(u8, u8)], dice: (u8, u8)) -> (bool, bool) { } /// Split `dice_jans` into (viewer_jans, opponent_jans). -fn split_jans(dice_jans: &[JanEntry], viewer_is_active: bool) -> (Vec, Vec) { +fn split_jans( + dice_jans: &[JanEntry], + viewer_is_active: bool, +) -> (Vec, Vec) { let mut mine = Vec::new(); let mut theirs = Vec::new(); for e in dice_jans { @@ -43,20 +46,12 @@ fn split_jans(dice_jans: &[JanEntry], viewer_is_active: bool) -> (Vec, if e.total >= 0 { mine.push(e.clone()); } else { - theirs.push(JanEntry { - total: -e.total, - points_per: -e.points_per, - ..e.clone() - }); + theirs.push(JanEntry { total: -e.total, points_per: -e.points_per, ..e.clone() }); } } else if e.total >= 0 { theirs.push(e.clone()); } else { - mine.push(JanEntry { - total: -e.total, - points_per: -e.points_per, - ..e.clone() - }); + mine.push(JanEntry { total: -e.total, points_per: -e.points_per, ..e.clone() }); } } (mine, theirs) @@ -112,7 +107,7 @@ pub fn GameScreen(state: GameUiState) -> impl IntoView { let show_hold_go = is_my_turn && vs.turn_stage == SerTurnStage::HoldOrGoChoice; // ── Jan split: viewer_jans / opponent_jans ───────────────────────────────── - let (my_jans, opp_jans) = split_jans(&vs.dice_jans, is_my_turn && !show_roll); + let (my_jans, opp_jans) = split_jans(&vs.dice_jans, is_my_turn); // ── Scores ───────────────────────────────────────────────────────────────── let my_score = vs.scores[player_id as usize].clone(); diff --git a/store/src/game_rules_points.rs b/store/src/game_rules_points.rs index 5738180..8f6c4df 100644 --- a/store/src/game_rules_points.rs +++ b/store/src/game_rules_points.rs @@ -591,17 +591,6 @@ mod tests { let jans = get_jans_by_ordered_dice(&rules.board, &[3, 3], None, false); assert_eq!(1, jans.len()); - // case intermédiaire dans son coin de repos vide : peut tout de même battre à vrai - rules.board.set_positions( - &Color::White, - [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], - ); - let jans = get_jans_by_ordered_dice(&rules.board, &[1, 4], None, false); - assert_eq!(1, jans.len()); - assert_eq!(1, jans.get(&Jan::TrueHitBigJan).unwrap().len()); - // premier dé bloqué, mais tout d'une possible en commençant par le second rules.board.set_positions( &Color::White,