This is a simple poker simulator I wrote as a passion project during the COVID-19 pandemic my first semester in college. I believe this project is what inspired me to major in Software Engineering. The code is wildly inefficient, and there are several parts of it I would change if I were to redo the project today. However, I have left it in its original form as a reminder of how far I have come as a programmer.
Specifically this is a version of 5 card draw. To run a user must first run the software in the terminal. A welcome message will prompt the user to select from 5 commands: shuffle, show deck, deal, count cards, end. They are flushed out below.
- Shuffle: The deck begins unshuffled. To receive a realistic hand, the user must first shuffle the cards in their deck before playing. If hands have been played, shuffle will restock the deck with all 52 cards.
- Deal: This starts the main action flow of the game. Deal will first ask the user for the number of hands to play. If a single hand is selected, the user will receive 5 cards and the program will assess the max value of the hand, defined below. If there are more than one hands selected, all will be displayed and evaluated, and then the winner will be announced. The program draws continuously from a static deck. If there are fewer than 5 cards remaining in the deck, it is reshuffled.
- Show Deck: (Debugging tool) Displays the remaining cards in the deck, in order
- Count Cards: (Debugging tool) Displays the number of cards remaining in the deck
- End: Exits the program
- Royal Flush
- Straight Flush
- Four of a Kind
- Full House
- Flush
- Straight
- Three of a Kind
- Two Pair
- One Pair
- High Card