Skip to content
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

Support Cash Game Option #74

Open
SirRender00 opened this issue Apr 3, 2022 · 4 comments
Open

Support Cash Game Option #74

SirRender00 opened this issue Apr 3, 2022 · 4 comments
Labels
enhancement New feature or request needs discussion Discussion about scope or if the feature is wanted
Milestone

Comments

@SirRender00
Copy link
Owner

Idea is to have a cash game option where:

  • Players can sit down and stand up whenever they want
  • Includes a rake
  • Includes a timeout option where the current player has to fold if no action is given
  • Register AIs

Idea: Have a Table Class in furtherance of this abstraction

@SirRender00 SirRender00 added the enhancement New feature or request label Apr 3, 2022
@SirRender00 SirRender00 added this to the v2.0.0 milestone Apr 3, 2022
@logicdotpy
Copy link

logicdotpy commented Apr 18, 2022

Hello, I'd like to potentially work on this.

If you could give me a high level pointer to where the Table abstraction fits amongst the others I can take it from there.

Cheers!

@SirRender00
Copy link
Owner Author

SirRender00 commented Apr 19, 2022

Hey @logicdotpy! Yeah that would be great if you could take a look at this! Here's my thoughts:

The main idea I think is that the Table class can wrap around the TexasHoldEm class and provide "thread-safe" access to the methods and attributes. For instance, we can call Table.unregister(player_id) at any time but the Table class will handle that smartly by first, making the next action of the player to be FOLD and then remove the player from the game (I think it suffices to just remove their chips at the end of the round). Similarly, for Table.register.

I put "thread-safe" in quotes here first because it's a lot like a locking mechanism but also second we should be able to pass in a time limit in the constructor. If there's a time-limit, there's probably a need for threading, but otherwise we should not be making new threads.

We can also keep a players dictionary that maps agents to player_ids so that the actions are taken automatically when it's a player's turn.

Let me know what you think! We can worry about integrating with the History and the TextGUI later and I can share more about the testing setup if you have questions.

@SirRender00
Copy link
Owner Author

In fact, I think we can split off the timeout option as a second phase for this. That probably makes this a bit better to work with

@SirRender00
Copy link
Owner Author

SirRender00 commented Apr 19, 2022

Let me ask actually... do you think it makes sense to have the register / unregister functionality in the TexasHoldEm class or this new Table class? I can see the point where we have a flag in the constructor cash_game=True which enables that functionality.

The Table abstraction makes perfect sense when we start talking about timeouts though.

@SirRender00 SirRender00 added the needs discussion Discussion about scope or if the feature is wanted label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs discussion Discussion about scope or if the feature is wanted
Projects
None yet
Development

No branches or pull requests

2 participants