This repository contains the implementation of a bare-bones version of the game logic for Virtual Poker. The purpose of this project is to help understand the rules and mechanics of poker by designing and implementing a simplified version of the game.
- Properties:
value
: Represents the value of the card (Ace to King)suit
: Represents the suit of the card (S, D, H, C)
-
Properties:
deck
: Represents a collection of cards in the deck
-
Methods:
shuffle()
: Shuffles the deck in placedealCards(player)
: Deals 2 cards to a playerburn_card()
: Burns a card before dealing turn/flop/river cardpick(numCards)
: Draws a specified number of cards from the deck
-
Properties:
ChipStack
: Represents the number of chips the player has remainingCards
: Represents the cards dealt to the player
-
Methods:
bet(amount)
: Places a bet with the specified amountcall(amount)
: Calls a bet with the specified amountcheck()
: Checks without placing a betfold()
: Folds the player's handshowCards()
: Shows the player's cards
-
Properties:
Deck
: Represents the deck of cardsPlayers
: Represents the players in the handsmallBlind
: Represents the small blind amountbigBlind
: Represents the big blind amountcommunityCards
: Represents the community cardsPot
: Represents the total pot amount
-
Methods:
start_hand()
: Starts a new handpreflop()
: Executes the preflop phaseend_hand()
: Ends the current hand
-
Properties:
numHands
: Represents the number of hands playedPlayers
: Represents the players in the gameDeck
: Represents the deck of cardsAnte
: Represents the ante amount
-
Methods:
Game()
: Constructor to initialize the gameinitializeDeck()
: Initializes the deck of cardsnewHand()
: Starts a new handstart_game()
: Starts the gameincrementHands()
: Increments the number of hands playedupdateBlinds()
: Updates the blind amounts