Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8631601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:14:27+00:00 2026-06-12T09:14:27+00:00

Edit It seems like I am getting different responses on how the game actual

  • 0

Edit It seems like I am getting different responses on how the game actual works, and after reading the official rules, and talking to numerous poker buddies, I guess I don’t know the rules myself. Any clarification would be appreciated.

I am working on a little poker game in MSVC++ 2010 Express, and have been stuck trying to come up with a way to code the sub pot system. For some reason I can not get my head around how it should work, and was wondering if SO could post some ways to go about it. Here is a particular situation that can, and more than likely will occur in a texas holdem poker game.

Situation:

Player A has first action with $50 chips and decides to go all in. Player B raises to $150. Player C has only $70s worth of chips and decides to go all in. Player D only has $20 and goes all in. Now, how can I devise a sub pot mechanism to track all these.

From what I understand, what would happen would be:

Player A creates the main pot with $50. You combine B and C’s $50s to make the main pot $150. You then take Player B’s leftover $100 and split it into $80 and $20. You then make a sub pot for Player B and C worth $40 (Player C’s leftover from the $70), and then you give back Player B’s $80 sine no one can cover it. Player D’s $20 bet goes into Player B, and Cs $40 sub pot, now worth $60. *(or does this not get added? Does it not get added to any bet since it cant cover the main pot of $50, if so then they dont get added to anything *

Now, when it goes down to evaluate. If Player A wins he wins the $150 from Player A, B and C. Next, Player B, C, and D go at it with their sub-pot worth $60.

If Player B wins, he wins everything.

If Player C wins, he wins the $150 from Player A, B, and C. He then challenges Player B, and D for the $60.

Player D can only win the $60, whereas, someone would have already won the Player A, B, and C pot when it goes down this far. (depends if this gets added or not to B, and C’s pot, since it doesn’t cover the main 50$ bet)

Is this how everything should work? I am having a hard time trying to figure out how I can track each bet, and sub-pot. Any ideas, or logical ways to implement it would help a lot. Thank you for your time. 🙂

I was thinking about having each bet being a unique id, or maybe each round has an id, and add each bet to an array to be evaluated that also points to container with player information. I also have to take into consideration that some players might be in sub pots and also be in hand already and fold, which means, I have to track that too.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:14:28+00:00Added an answer on June 12, 2026 at 9:14 am

    In this example both main and side pots are calculated wrong.

    RULE: The ruling principle is that each player matches as much of the opponents’ bets as he has left in his stack.

    Calculation:

    1) First, we consider a player with the smallest stack (who went all in). In the current example this is a player D with $20.

    2) Next we sum up $20 from each player (A,B,C,D) and the main pot is formed equal to $80, it is contested by all players.

    3) Players’ chips left A – $30, B – $130, C – $50, D – $0

    4) Next we consider the second smallest stack, in the current example this is player A who has $30 left. The side pot1 is formed equal to $30(A) + $30(B) +$30(C)= $90. Player D can’t win this side pot as he ran out of money.

    5) Players’ chips left A – $0, B – $100, C – $20

    6) The side pot2 is formed equal to $20(B) + $20(C)= $40. Player A can’t win this side pot as he ran out of money.

    7) Player B has $80 left, this amount is returned to him.

    So we finally get:

    Main pot = $80, contested by all players A,B,C,D

    Side pot1 = $90, contested by A,B,C

    Side pot2 = $40, contested by B,C

    $80 returns to player B

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This seems like such a simple question. I have several Edit boxes on my
EDIT : I completely re-wrote the question since it seems like I was not
[edit] So it seems my code works fine, another piece of code + tiredness
Edit: [Solved] : It seems that the getTableCellRendererComponent of the CustomTableCellRenderer is called every
Which algorithms or data structures are used in auto-suggest features? It seems that edit-distance
It seems it allows you to edit the content of an element, but what
[EDIT] Based on feedback yes, VS2010 seems to support SL4 Library TDD despite a
Whenever I edit files on emacs, it seems a temporary file is created with
PLEASE SEE THE EDIT BELOW, THE REPORT SEEMS TO USE CACHED DATA? I cant
EDIT - there are no blank lines. EDIT 2 - my bad, it seems

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.