I will start by checking the existing files in the project to understand its structure.
I will check package.json to see what packages are installed and if we need any additional libraries like lucide-react, framer-motion, or canvas-confetti.
I will install lucide-react, framer-motion, canvas-confetti, and @types/canvas-confetti to enhance our curling game's UI, animations, icons, and win celebrations.
I will read src/index.css to verify the CSS configuration.
I will read index.html to check the title and meta tags.
I will update index.html with a fitting title for our Curling game and include Google Fonts (Inter and Outfit) for a sleek, sports-broadcast aesthetic.
I will enhance src/index.css with font variables, custom scrollbars, and styling for our curling ice texture.
I will create src/types/curling.ts to define the interfaces and types for stones, teams, game modes, physics parameters, camera views, and challenges.
I will create src/physics/curlingPhysics.ts containing the curling physics equations, friction decay, lateral curl drift, sweeping heat calculation, elastic stone collisions, free guard zone checking, and house scoring logic.
I will create src/audio/soundEngine.ts to synthesize realistic curling audio effects using the Web Audio API, including the characteristic sliding rumble on pebble ice, broom sweeping swishes, stone collision clacks, and victory chimes.
I will create src/data/teamsAndChallenges.ts with national curling teams, signature stone handle colors, and 10 curling shot puzzle challenges.
I will create src/components/Scoreboard.tsx to display the broadcast-style curling scoreboard with team flags, end-by-end scoring, hammer indicator, remaining stones, and game control buttons.
I will remove the unused Eye import from src/components/Scoreboard.tsx.
I will create src/components/RinkCanvas.tsx to render the curling sheet, concentric rings, realistic granite stones with rotating handles, aiming trajectory lines, dynamic sweeping heat particles, and the measuring laser caliper.
I will remove the unused Stone import and activeTeam variable from src/components/RinkCanvas.tsx.
I will remove the unused activeTeam line from src/components/RinkCanvas.tsx.
I will create src/components/Controls.tsx featuring the Turn Selection (In-Turn vs Out-Turn), Precision Draw Weight slider with target weight indicators, and the dynamic Sweeping dashboard.
I will create src/components/SkipAdvice.tsx to provide the Skip's tactical advice, challenge objectives, and curling terminology tips.
I will create src/components/EndSummaryModal.tsx to present the scoring breakdown at the end of each end, show closest rock measurements, transfer hammer advantage, and trigger celebratory confetti on match completion.
I will remove the unused Award import from src/components/EndSummaryModal.tsx.
I will create src/components/ChallengeModal.tsx to let players select and replay any of the 10 shot puzzle challenges.
I will remove the unused Award import from src/components/ChallengeModal.tsx.
I will create src/components/TutorialModal.tsx containing an illustrated guide to Curling rules, turn physics, sweeping mechanics, and strategy.
I will create src/components/SandboxControls.tsx for the sandbox practice rink mode, enabling custom stone placements, instant resets, and unlimited trajectory experiments.
I will remove the unused RotateCcw import from src/components/SandboxControls.tsx.
I will create src/components/Lobby.tsx for the main start screen where players choose game modes, customize national teams, select AI difficulty, and configure match ends.
I will now replace src/App.tsx with the master Curling Game controller, integrating the state machine, physics animation loop, AI Skip intelligence, pass-and-play multiplayer, sandbox practice mode, and shot challenges.
I will remove the unused showSummaryModal variable from src/App.tsx.
I will check where showSummaryModal was used in src/App.tsx.
I will update src/App.tsx to call setShowEndSummary(true) when an end finishes.
I will now test building the project to verify that there are no TypeScript errors, missing dependencies, or build failures.
I have created Roaring Ice: Olympic Curling & Ice Physics Simulator — a feature-rich curling game in React and Tailwind CSS.
🌟 Key Features & Mechanics Built:
- Stone Sliding Physics & Curl Drift:
- Implemented realistic curling physics in
src/physics/curlingPhysics.ts modeling an Olympic regulation 46-meter sheet.
- The Curl Effect: When a stone is delivered with clockwise (In-Turn) or counter-clockwise (Out-Turn) spin, asymmetric friction on the pebble ice creates lateral drift. Crucially, as forward momentum decelerates, lateral curl acceleration increases—creating the signature late-hook curve of real curling!
- 2D Elastic Stone Collisions: Accurate momentum conservation with angular spin exchange during off-center hits.
- Sweeping Mechanics (Hurry Hard!):
- When a rock is in motion, players can click and hold the SWEEP! button or scrub across the ice ahead of the stone.
- Sweeping warms the ice, reducing friction by up to 24% (letting the rock glide up to 3–4 meters farther) and reducing lateral curl by up to 50% (straightening the trajectory through narrow guard gaps).
- Features real-time particle shavings and an interactive ice temperature meter.
- Target House & Scoring System:
- Concentric 12-foot blue ring, 8-foot white ring, 4-foot red ring, and the center Button pin.
- Precise distance calculation at the end of each end: only rocks touching or inside the 12-foot ring score. Whichever team owns the rock closest to the button receives 1 point for every stone closer than the opponent's best stone.
- Measuring Caliper Laser Tool: Deploy a spinning 360° caliper line to measure millimeter distances of close stones.
- Free Guard Zone Rule: Protects opponent guards in front of the house during the first 5 stones of an end.
- Turn-Based Modes & AI Skip Brain:
- 🏆 Tournament vs AI: Choose from 3, 5, 8, or 10 ends against our Curling AI with selectable difficulty (Beginner, Club Skip, or Olympic Grandmaster).
- 👥 Pass & Play (2-Player Local): Play with a friend on the same screen, alternating throws and sweeping duties.
- 🧩 10 Shot Puzzles & Drills: Recreate famous curling challenges (Draw around Guards, Double Takeouts, Freezes, and Split-the-House shots) with 3-star ratings.
- 🧪 Sandbox Practice Rink: Click anywhere on the sheet to place custom stones, test draw weights, and toggle ice speed between Fast Olympic Ice, Normal Club Ice, and Heavy Slow Ice.
Files built: index.html, src/index.css, src/types/curling.ts, src/physics/curlingPhysics.ts, src/audio/soundEngine.ts, src/data/teamsAndChallenges.ts, src/components/Scoreboard.tsx, src/components/RinkCanvas.tsx, src/components/Controls.tsx, src/components/SkipAdvice.tsx, src/components/EndSummaryModal.tsx, src/components/ChallengeModal.tsx, src/components/TutorialModal.tsx, src/components/SandboxControls.tsx, src/components/Lobby.tsx, src/App.tsx