Skip to content

[Stretch] Daily challenge mode with seeded shuffles #27

Description

@bh2smith

Summary

Use today's date as an RNG seed to produce a deterministic deck for any game. All players on the same day face the same deal.

Tasks

  • Implement seededShuffle(deck, seed: number): PlayingCard[] in src/shared/deck.ts using a seedable PRNG (e.g. mulberry32 or xorshift — no npm package needed, ~10 lines)
  • Add dailySeed(): number — converts today's date (YYYYMMDD) to a number
  • Each game's deal() accepts an optional seed parameter; if provided, use seeded shuffle
  • Lobby: 'Daily Challenge' button visible for each game; shares a URL with ?daily=YYYYMMDD param
  • Stats panel shows daily challenge win/loss separately from free play

Metadata

Metadata

Assignees

No one assigned

    Labels

    archShared architecturepriority: P5Stretch / optionalstretchNice-to-have / later

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions