I am attempting to create an poker tournament software and I am getting hung up on how exactly to keep track of hands, dealer/action position, tables, and tournaments.<p>In my eyes there are three things that need to be tracked.<p>Hands, which are a subset of Tables, which are a subset or Tournaments.<p>I've created the idea of a *<i>tournament_registration*</i> table that simply stores the *<i>account_id*</i> of the eager player and the *<i>tournament_size*</i> of the size of tournament they're after.<p>Whenever a new *<i>account_id*</i> is added to the *<i>tournament_registration*</i> table for a certain *<i>tournament_size*</i>, I query the table after the insert to determine if enough players have registered for a certain tournament size.<p>That setup seems fairly optimal.<p>But when it comes to seating players at a table... I am confusing myself (probably overthinking this) as to how exactly to keep track of hand progression at each table.<p>Any help/direction would be greatly appreciated.<p>Cheers!<p>I did try researching this of course, but any search for "poker database best practices" only turns up countless poker tracking softwares.<p>And unfortunately not many private poker websites talk at length about their setups.
I think you summed it up with Hand is subset of Table is subset of Tournament.<p>When creating a new table randomise which Player sits where, with Dealer being a bot Player that has rules on how it plays its hand.<p>Keep an isActive on the Hands so you know who’s turn it is, and a sequential number so you know which order they sit in at the Table<p>If you focus on one Table and figure that out I think you’ll replicate it easily to a Tournament of Tables<p>Good luck! Sounds fun!<p>I made a pascal blackjack game in high school and this has brought back some fond memories of fun coding