Skip to the content.

Poker (5-Card Draw)

Overview

5-Card Draw is the classic poker variant where players are dealt five cards and can exchange some or all of them in an attempt to make the best poker hand.

Status: πŸ”œ Coming Soon
Players: 2-8
Difficulty: Medium
Deck: 1 standard 52-card deck

Objective

Win chips by having the best five-card poker hand at showdown or by making all other players fold.

Rules

Card Rankings (Highest to Lowest)

  1. Royal Flush: A, K, Q, J, 10 of the same suit
  2. Straight Flush: Five consecutive cards of the same suit
  3. Four of a Kind: Four cards of the same rank
  4. Full House: Three of a kind plus a pair
  5. Flush: Five cards of the same suit
  6. Straight: Five consecutive cards of mixed suits
  7. Three of a Kind: Three cards of the same rank
  8. Two Pair: Two different pairs
  9. One Pair: Two cards of the same rank
  10. High Card: Highest card when no other hand is made

Game Structure

  1. Ante: All players put in a small forced bet
  2. Deal: Each player receives 5 cards face down
  3. First Betting Round: Players bet based on their initial hand
  4. Draw: Players can discard and draw new cards
  5. Second Betting Round: Players bet after the draw
  6. Showdown: Remaining players reveal hands, best hand wins

How to Play

Step 1: Ante

Step 2: Deal

Step 3: First Betting Round

Step 4: Draw Phase

Step 5: Second Betting Round

Step 6: Showdown

Strategy Tips

Starting Hands

Strong Hands (Bet/Raise):

Marginal Hands (Call):

Weak Hands (Fold):

Drawing Strategy

With a Pair:

With Two Pair:

With Three of a Kind:

With Four to a Flush:

With Four to a Straight:

Betting Strategy

  1. Bet strong hands - Build the pot with good hands
  2. Bluff occasionally - Represent strong hands you don’t have
  3. Position matters - Act last to see what others do
  4. Watch opponents - Notice their drawing patterns
  5. Pot odds - Call only if pot odds justify it

Implementation Details

Planned Features

API Endpoints

GET https://deckofcardsapi.com/api/deck/new/shuffle/?deck_count=1
GET https://deckofcardsapi.com/api/deck/{deck_id}/draw/?count=5  # Initial deal
GET https://deckofcardsapi.com/api/deck/{deck_id}/draw/?count=N  # Draw phase (N = cards discarded)

Technical Implementation

class PokerGame {
  final String deckId;
  final List<PokerPlayer> players;
  final int pot;
  final PokerGamePhase phase; // ante, deal, bet1, draw, bet2, showdown
  final int currentBet;
  final int ante;
}

class PokerPlayer {
  final String id;
  final List<CardModel> hand;
  final int chips;
  final bool hasFolded;
  final int currentBet;
}

enum PokerGamePhase {
  ante,
  deal,
  firstBetting,
  draw,
  secondBetting,
  showdown,
}

Glossary

Probability Reference

Hand Probability Odds
Royal Flush 0.00015% 649,739:1
Straight Flush 0.0014% 72,192:1
Four of a Kind 0.024% 4,164:1
Full House 0.14% 693:1
Flush 0.20% 508:1
Straight 0.39% 254:1
Three of a Kind 2.11% 46:1
Two Pair 4.75% 20:1
One Pair 42.26% 1.4:1
High Card 50.12% 1:1

References