Firehawk
✅ Texas holdem poker
When checking for combinations, you're going to want to start by checking for the best possible combination (royal flush), down to the worst (high card) in order. Each player will end up with 2 cards, with 3 on the river.
Read up on each type of hand if you don't know them already, then its just a matter of checking for value and suit. For example a royal flush is A, K, Q, J and 10 all in the same suit. You check that first because you want to use a player's best possible combination if that's the one that matches.
Just to make that point clear - For example, if you checked for three of a kind first, you could miss that someone has a full house if you stopped there.
Also, if you're dealing with card class instances, it does make sense to deal cards and store them inside of a player class, along with how much they're betting into the pot, and how much money they have to bet with. Though, it could make sense to store their bet elsewhere in the case of a split pot, haven't thought about it that far.
Hopefully that helped to some degree
6 replies