-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table and Players #13
Comments
If this covers all usage cases then there is a heap of functions I have that also fit in here, and shouldn't be a matter of opinion. Table updates get driven by |
I think this is out of scope. Let me split up what I find less controversial and what I think is not for Less controversial:
Controversial:
A good way to handle State, in my experience, is to have granular effects, which is what I attempt to capture in poker-game (perhaps poorly named?). That package handles only your That way, someone who comes in to use our ecosystem does something like:
I think this works out, because
I've trimmed some fluff, because that really is all we need afaik. I would suggest that our approach should be to keep this in an external package for the time being, because even if we find a unification of all the above, I think it would take a couple of weeks. Maybe one way we can do this is if I clean up Sorry for the wall of text! Do you have a personal project like |
Ok, your GameState is my Table. I've coded up pre-flop only, getting a sense of it. My TL;DR is yes, I agree that GameState is a hard slog to get right and shove in to poker-base. However, just glancing at your GameState (I haven't seen poker-game before now, or poker-maison), I can tell that you've spent some time whittling it down and that it is close to the bare minimum needed to model a real-life game of holdem. My Player example is just a semantic difference. If it is actually that then anything else is isomorphic or not a game of holdem. |
Closing. This covers material in poker-game but with different namings and might be a bit confusing to newcomers. |
I think something like Player and Table belongs in base. They kind of go together and it may be a matter of taste as to what parts are a Table and what parts are a Player.
A Player has a Seat, a Stack and, once cards are dealt, some Hole cards. A player acts via BetAction. They have "Bets" which are chips that have been anted or bet so far. They also have some state like "BettingOpen | BettingClosed | Folded | NeverSatDown"
A Table, which is composed of ante structure, TableSize, list of Players, Board, Pots (consisting of folded antes and chips, and plural due to side pot potential), BigBlind (a cursor of which Player is/was the big blind), NextToAct (a cursor for the current actor) & ActionToDate (some history of Table State). Also (maybe) Focus, which might be sort of your Hero, representing what parts of the Table are visible. Tricky to define that.
I separate Bets and Pots as this seems to be the easiest way to work out side pots, split pots and all of that. It may not be.
The text was updated successfully, but these errors were encountered: