You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to express my appreciation for the excellent work on the odds calculation tool. It has proven to be a valuable asset in our poker-related endeavors.
During our usage, we encountered a potential flaw in the tool, specifically in the handling of 5-card Omaha scenarios. After a thorough investigation, we believe we have identified a particular code segment that may be causing an unintended error.
In the Player.js file, located at the path /poker-odds-calc/dist/lib/Player.js, we observed the following lines of code:
setHand(hand) {
const game = this.Table.getGame();
if ((game.isTexasHoldem() || game.isSixPlusTexasHoldem()) && hand.length !== 2)
throw new Error("A Texas hold'em hand must contain exactly 2 cards!");
if (game.isOmaha() && hand.length !== 4)
throw new Error("An Omaha hand must contain exactly 4 cards!");
this.hand = hand.map(c => {
const card = this.Table.getDeck().getCards().find(card => card.toString() === c);
if (!card)
throw new Error(`Card "${c}" not found!`);
return card.setOwner(this);
});
return this;
}
We believe that the condition checking for the length of the hand in Omaha games might be causing unnecessary issues. To address this, we suggest commenting out the relevant lines, as shown below:
setHand(hand) {
const game = this.Table.getGame();
if ((game.isTexasHoldem() || game.isSixPlusTexasHoldem()) && hand.length !== 2)
throw new Error("A Texas hold'em hand must contain exactly 2 cards!");
// Commenting out the condition for Omaha hand length
// if (game.isOmaha() && hand.length !== 4)
// throw new Error("An Omaha hand must contain exactly 4 cards!");
this.hand = hand.map(c => {
const card = this.Table.getDeck().getCards().find(card => card.toString() === c);
if (!card)
throw new Error(`Card "${c}" not found!`);
return card.setOwner(this);
});
return this;
}
This modification allows for a smoother handling of 5-card Omaha scenarios. We hope you find this information helpful in maintaining and improving the overall functionality of the odds calculation tool.
The text was updated successfully, but these errors were encountered:
I want to express my appreciation for the excellent work on the odds calculation tool. It has proven to be a valuable asset in our poker-related endeavors.
During our usage, we encountered a potential flaw in the tool, specifically in the handling of 5-card Omaha scenarios. After a thorough investigation, we believe we have identified a particular code segment that may be causing an unintended error.
In the Player.js file, located at the path /poker-odds-calc/dist/lib/Player.js, we observed the following lines of code:
We believe that the condition checking for the length of the hand in Omaha games might be causing unnecessary issues. To address this, we suggest commenting out the relevant lines, as shown below:
This modification allows for a smoother handling of 5-card Omaha scenarios. We hope you find this information helpful in maintaining and improving the overall functionality of the odds calculation tool.
The text was updated successfully, but these errors were encountered: