This document provides a detailed, class-by-class breakdown of the Blackjack project, including the expected method signatures and descriptions of class interactions, using only standard Markdown syntax.
| Component | Signature / Example Call | Purpose |
| :--- | :--- | :--- |
| **Constructor** | `def __init__(self, name: str, chips: int)` | Sets up the player's name, starting chips, and a new `Hand` object. |
| **Attribute** | `- hand: Hand` | The specific `Hand` object associated with this player. |
| **Method** | `def hit(self, deck: Deck) -> None` | **Draws Card:** Retrieves a card from the `Deck` (`deck.deal_card()`) and passes it to the internal hand (`self.hand.add_card(...)`). |
| **Call Example** | `player.hit(my_deck)` | Called when a player chooses to draw a card. |
| **Method** | `def stand(self) -> None` | **Ends Turn:** Sets an internal state (e.g., `$is\_standing = True$`) to signal the end of the player's draw phase. |
| **Call Example** | `player.stand()` | Called when a player is satisfied with their hand. |
| **Method** | `def play_round(self) -> None` | **Main Flow Controller:** Manages dealing, player input loops, the dealer's `play()` call, and calling `compare_hands()`. |
| **Call Example** | `my_game.play_round()` | The main function that drives one full round of Blackjack. |
| **Method** | `def show_cards(self, hide_dealer: bool) -> None` | Displays the cards. The boolean determines if the dealer's second card is shown or concealed. |
| **Call Example** | `game.show_cards(hide_dealer=True)` | Called at the beginning of the round. |
| **Method** | `def compare_hands(self, bet: int) -> str` | **Resolution/Payout:** Compares final hand values, checks for Bust, Blackjack, and highest value. **Updates `player.chips`** based on the outcome and the `bet`. Returns the result string (e.g., "Player Wins!"). |
| **Call Example** | `result = game.compare_hands(50)` | Called once both players stand or bust. |