Files
blackjack/src/pyjack/player.py

22 lines
566 B
Python
Raw Normal View History

2025-10-26 19:38:23 +01:00
from pyjack.hand import Hand
from pyjack.deck import Deck
class Player:
"""Sets up the player's name, starting chips, and a new Hand object."""
2025-10-27 17:38:51 +01:00
def __init__(self, chips: float) -> None:
2025-10-26 19:38:23 +01:00
self.hand = Hand()
self.chips = chips
def hit(self, deck: Deck):
"""Draws Card: Retrieves a card from the Deck and passes it to
the internal hand."""
self.hand.add_card(deck.deal_card())
def stand(self) -> None:
"""Sets an internal state, signaling the end of the players
draw phase."""
return