Add complete Texas Hold'em poker gameplay including: - Pure function game engine (deck, dealing, betting, showdown) - Hand evaluator supporting all 10 poker hand ranks - Animated card components with 3D flip transitions - CSS Grid oval poker table layout for up to 9 seats - Player seat components with chip tracking and turn indicators - Bet controls with conditional button visibility - Basic AI opponents with random valid action selection - Turn advancement, all-in auto-advance, and dealer rotation Sync delta specs to main specs: poker-table, card-components, game-engine, player-state.
30 lines
1.9 KiB
Markdown
30 lines
1.9 KiB
Markdown
## Why
|
|
|
|
The project is a blank SvelteKit scaffold with no poker functionality. We need to build the foundational playable poker table — the core UI, game logic, and card components that make up the basic gameplay experience. This is the prerequisite for all future features (bots, strategy tools, education).
|
|
|
|
## What Changes
|
|
|
|
- Create an interactive poker table UI with player seats, community card area, pot display, and betting controls
|
|
- Build animated card components using Svelte 5 runes and native transitions (flip, deal, hover effects)
|
|
- Implement Texas Hold'em game logic engine covering all four betting rounds (pre-flop, flop, turn, river) and hand evaluation
|
|
- Add player state management (chips, bets, fold/active status, position tracking)
|
|
- Style everything using Svelte's native scoped CSS with CSS custom properties driven by runes
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
- `poker-table`: Visual poker table layout with 9-player seating, community cards area, pot display, and action buttons
|
|
- `card-components`: Reusable card component with flip animations, suit/rank rendering, and deal transitions using Svelte native transitions
|
|
- `game-engine`: Texas Hold'em game logic including deck management, dealing, betting rounds, hand evaluation, and winner determination
|
|
- `player-state`: Player seat model tracking chips, current bet, status (active/folded/all-in), position (dealer button rotation), and action history
|
|
|
|
### Modified Capabilities
|
|
(No existing capabilities — fresh project)
|
|
|
|
## Impact
|
|
|
|
- **New files**: Components in `src/lib/components/`, game logic in `src/lib/game/`, types in `src/lib/types/`
|
|
- **Route**: Main poker table page at `src/routes/+page.svelte`
|
|
- **Dependencies**: No new npm packages; using Svelte 5 runes, native CSS, and built-in transition primitives only
|
|
- **Affected files**: `src/routes/+layout.svelte`, `src/routes/+page.svelte` (replace starter content)
|