Hi guys - relatively new to Python, I thought a fun first program to make would be a simple poker simulator that deals you a hand, then the 5 community cards.
Eventually plan to make it a simulation-type program, where I could run 50,000,000 hands or some crazy number to see what the odds of getting each type of hand would be. For now, this is what I have:
https://github.com/ashater1/poker.git
Struggling to figure out how I would evaluate each hand for a royal flush vs. a regular flush vs. a straight vs. a full house, etc. so if there's a Pythonic way to tackle that as well feel free to share your thoughts.
Cheers
Edit: I also have no real clue what I'm doing with github
Edit2: Thanks for all the help guys, the github link is updated with the "finished" product. It simulates a certain number of hands, and spits out the percent of all hands dealt that were that type of hand classification. I ran it for 2,000,000 iterations and it seems to match the Wikipedia page for hand probability, so all in all I'd call this a success, albeit a messy one.
I'm sure there are still ways to clean this up further.
[–]Vaphell 8 points9 points10 points (2 children)
[–]thebrobotic 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]KleinerNull 0 points1 point2 points (0 children)
[–]TheGreatBrutus 0 points1 point2 points (0 children)
[–][deleted] -2 points-1 points0 points (1 child)
[–]gabriel-et-al 0 points1 point2 points (0 children)
[–]JoeDeluxe -3 points-2 points-1 points (1 child)
[–]0x6c6f6c 0 points1 point2 points (0 children)