diff --git a/src/games/harmonie/config.ts b/src/games/harmonie/config.ts index be6e2cc..ba9e506 100644 --- a/src/games/harmonie/config.ts +++ b/src/games/harmonie/config.ts @@ -1,17 +1,19 @@ import { GameConfig, ScoringCategory } from "../../types"; const BASE_CATEGORIES: ScoringCategory[] = [ - { id: "arbres", label: "Arbres" }, - { id: "montagnes", label: "Montagnes" }, - { id: "champs", label: "Champs" }, - { id: "batiments", label: "Bâtiments" }, - { id: "eau", label: "Rivière" }, - { id: "animaux", label: "Animaux" }, + { id: "arbres", label: "Arbres", icon: "TreePine", color: "#16a34a" }, + { id: "montagnes", label: "Montagnes", icon: "Mountain", color: "#64748b" }, + { id: "champs", label: "Champs", icon: "Wheat", color: "#d97706" }, + { id: "batiments", label: "Bâtiments", icon: "Building2", color: "#dc2626" }, + { id: "eau", label: "Rivière", icon: "Waves", color: "#0ea5e9" }, + { id: "animaux", label: "Animaux", icon: "Rabbit", color: "#a16207" }, ]; const NATURE_SPIRIT_CATEGORY: ScoringCategory = { id: "esprits_nature", label: "Esprits de la nature", + icon: "Sparkles", + color: "#8b5cf6", }; export const harmonieConfig: GameConfig = { diff --git a/src/pages/GameOver.tsx b/src/pages/GameOver.tsx index c657bf5..51a184a 100644 --- a/src/pages/GameOver.tsx +++ b/src/pages/GameOver.tsx @@ -137,7 +137,7 @@ export default function GameOver() { const topWinner = totals.find((t) => t.isWinner)?.player; return ( -
+
{/* 💥 Animation de Célébration (disparaît après qq secondes) */} {showCelebration && topWinner && ( @@ -242,11 +242,21 @@ export default function GameOver() { {categories.map((cat) => { const val = t.details?.[cat.id]; if (!val || val === "0") return null; + const CatIcon = cat.icon + ? (Icons as any)[cat.icon] + : null; return (
+ {CatIcon && ( + + )} {cat.label} @@ -262,6 +272,89 @@ export default function GameOver() { ))}
+ + {/* Round-by-round detail (multi-round games) */} + {session.rounds.length > 1 && ( +
+

+ Détail des manches +

+ + + + + + + {session.players.map((p) => ( + + ))} + + + + {session.rounds.map((round) => ( + + + {session.players.map((p) => { + const s = round.scores.find( + (sc) => sc.playerId === p.id, + ); + return ( + + ); + })} + + ))} + + + {session.players.map((p) => ( + + ))} + + +
+ Manche + + {p.name} +
+ #{round.roundNumber} + + {s ? s.score : "—"} + {s?.caboCall === "success" && ( + + ✓ + + )} + {s?.caboCall === "fail" && ( + + ✗ + + )} + {s?.kamikaze && ( + + K + + )} +
+ Total + + {calculateTotalScore(p.id)} +
+
+
+
+ )}
diff --git a/src/pages/PlayGame.tsx b/src/pages/PlayGame.tsx index c7cb224..d0bcb5a 100644 --- a/src/pages/PlayGame.tsx +++ b/src/pages/PlayGame.tsx @@ -322,13 +322,31 @@ export default function PlayGame() { {/* Current Round Input Section */}
-

- {categories - ? categories[currentCategoryIndex].label - : isSingleRound - ? "Saisie des scores" - : "À vos marques !"} -

+
+ {categories && + (() => { + const cat = categories[currentCategoryIndex]; + const CatIcon = cat.icon ? (Icons as any)[cat.icon] : null; + return CatIcon ? ( + + + + ) : null; + })()} +

+ {categories + ? categories[currentCategoryIndex].label + : isSingleRound + ? "Saisie des scores" + : "À vos marques !"} +

+
{categories && currentCategoryIndex > 0 && (