#114

feat(hearts): classic Hearts with pass cycle and shoot-the-moon

Opentheworker02wants to merge intofrom

Summary

  • Adds src/hearts/: an original open-source Hearts matching documented classic Microsoft Hearts rules (pass left → right → across → hold, 2♣ opening lead, follow-suit, hearts-breaking, first-trick dump ban, ♥=1 / Q♠=13, shoot-the-moon, play to 100).
  • Three heuristic computer opponents, New match / Continue flow, light/dark/system theme — original felt chrome (no proprietary assets).
  • Vitest coverage for cards, deal/pass, legal plays, scoring/moon, and full-hand engine play (npm test: 21 passed). Amplify + customHttp.yml registered; Games README row added.

Feature comparison (DOCUMENTED vs ours)

Evidence class: DOCUMENTED public rules. No LIVE Windows binary was run — see src/hearts/README.md for the full matrix (Pass / Partial / Fail / Untested labels).

FeatureReference (DOCUMENTED)OursResult
Pass cycle L/R/across/holdClassic MS HeartsSamePass
2♣ leads first trickDocumentedSamePass
Follow suit / hearts brokenDocumentedSamePass
No ♥/Q♠ dump on first trickDocumentedSamePass
Scoring + shoot the moon26 pts / others +26SamePass
Match to 100Lowest winsSamePass
AI opponentsBuilt-inHeuristicPartial
Win32 chrome / soundsLIVE UIOriginal CSS onlyPass (intentional)

Test plan

  • cd src/hearts && npm ci && npm test && npm run build
  • Pass 3 cards left; confirm AI seats also pass; 2♣ holder leads
  • Follow-suit enforcement; cannot lead hearts until broken
  • Complete a hand; scores add; moon awards others +26 when applicable
  • Reach 100 and confirm lowest total wins / New match resets