The ideaI started to write classes for poker. The goal is to make them as flexible as possible, so i could use them for multiple purposes:
-SNGWizard alike advisor for push or fold situations
-pokerrom to play against friends
-simulate toy games like Kuhn poker
-hand replayer
-can be you with different poker types (SNG, cash game) and variants (PLO, NLHE )
What i have so fari have to do next-introduce PHASE (post, preflop, flop, turn river, showdown)
Short terms next goals-Deck class (for shuffling), toy games dont need 52 card deck
-Range class: makes fancy annotation (Axs, 22-55, AJs+,Ts2s) to a list of hands, card removal
Some questions:
-as you can see i have the class HandState (maybe GameNode is more common name for it). The idea was that every action (bet, fold etc) generates a new handstates, which belong to a hand. If a player acts, a new handstate will be created. They can be also a representation of possible ways to play a hand (game tree). Do you think its a good idea? How do you store the "hand history" (squence of actions so far), and generate the theoretical ones (possible states in the future)?
-A Player has to know which legal action are available if he is to act. There are different rules in NL and FL, not to mention toy games, or forced strategies (push or fold). How do you represent poker rules in your bot?
Please feel free to comment, criticize. If you see something, what you would write/stucture another way, please let me know.