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.
76 lines
3.1 KiB
Markdown
76 lines
3.1 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Oval table layout with player seats
|
|
The poker table UI SHALL render an oval-shaped table with positions for up to 9 player seats arranged around the perimeter.
|
|
|
|
#### Scenario: Default 6-max table renders correctly
|
|
- **WHEN** the game initializes with 6 players
|
|
- **THEN** 6 seat positions are displayed around the oval table at evenly spaced intervals
|
|
|
|
#### Scenario: Table supports up to 9 seats
|
|
- **WHEN** the game is configured for 9 players
|
|
- **THEN** all 9 seat positions are visible and arranged in an oval pattern
|
|
|
|
### Requirement: Community card area
|
|
The poker table SHALL display a designated area in the center of the table for community cards (flop, turn, river).
|
|
|
|
#### Scenario: Empty community area before deal
|
|
- **WHEN** the game is in pre-game state
|
|
- **THEN** the community card area shows no cards
|
|
|
|
#### Scenario: Community cards displayed after flop
|
|
- **WHEN** the game reaches the flop stage
|
|
- **THEN** exactly 3 community cards are visible in the center area
|
|
|
|
#### Scenario: All 5 community cards visible at river
|
|
- **WHEN** the game reaches the river stage
|
|
- **THEN** all 5 community cards (3 flop + turn + river) are displayed
|
|
|
|
### Requirement: Pot display
|
|
The poker table SHALL show the current pot size as a numeric value in the center of the table.
|
|
|
|
#### Scenario: Pot starts at zero
|
|
- **WHEN** a new hand begins before blinds are posted
|
|
- **THEN** the pot display shows 0
|
|
|
|
#### Scenario: Pot updates after bets
|
|
- **WHEN** players place bets during a betting round
|
|
- **THEN** the pot value reflects the sum of all bets and blinds in the current hand
|
|
|
|
### Requirement: Action buttons for human player
|
|
The poker table SHALL provide action buttons (Check, Call, Raise, Fold, All-In) for the human player when it is their turn.
|
|
|
|
#### Scenario: Buttons shown on player turn
|
|
- **WHEN** it is the human player's turn to act
|
|
- **THEN** action buttons are visible and enabled
|
|
|
|
#### Scenario: Buttons hidden when not player turn
|
|
- **WHEN** another player is acting or the game is in a non-betting phase
|
|
- **THEN** action buttons are hidden or disabled
|
|
|
|
#### Scenario: Check button only available when no bet to call
|
|
- **WHEN** no preceding bet exists in the current betting round
|
|
- **THEN** the Check button is enabled and Call button is hidden
|
|
|
|
### Requirement: Dealer button indicator
|
|
The poker table SHALL display a dealer button that identifies the current dealer position.
|
|
|
|
#### Scenario: Dealer button visible at correct seat
|
|
- **WHEN** a hand is in progress or between hands
|
|
- **THEN** the dealer button is displayed at the current dealer's seat position
|
|
|
|
#### Scenario: Dealer button rotates after each hand
|
|
- **WHEN** a hand completes and a new hand begins
|
|
- **THEN** the dealer button moves one position clockwise
|
|
|
|
### Requirement: Player chip count display
|
|
Each player seat SHALL display the current chip count for that player.
|
|
|
|
#### Scenario: Initial stack shown on game start
|
|
- **WHEN** the game initializes with starting stacks
|
|
- **THEN** each seat displays the correct starting chip amount
|
|
|
|
#### Scenario: Chip count updates after betting
|
|
- **WHEN** a player places a bet or wins a pot
|
|
- **THEN** the displayed chip count reflects the updated balance
|