Questions tagged [poker]

Questions relating to development on the subject of all variants of poker.

Questions in this category contains all aspects of development relating to poker - ie. hand evaluation, game engine, statistics, etc.

464 questions
4
votes
1 answer

Java library to calculate the equity of texas poker hands

Does anyone know a fast java algorithm\library to calculate the equity or the probability of winning (as the program PokerStove) of texas poker hands?
Webman
  • 1,534
  • 3
  • 26
  • 48
4
votes
1 answer

How do I copy three cards in a third array?

For an exercise in a poker game: I create an initial array of objects that contains 7 cards. Each card is designated by its value (7, 8, 9, 10, jack...) and its suit (club, diamond...). I create a second array that counts the number of cards of the…
Matt
  • 41
  • 2
4
votes
7 answers

Dice Question (Full House and Straight recognition)

I'm making a dice game. There are 5 dice in which I have all the values for and I need to determine if they make up a full house (3 of one and 2 of another), small straight (1-4, 2-6 or 3-6) or a large straight (1-5, 2-6). Perhaps the best way to…
Lloyd Powell
  • 18,270
  • 17
  • 87
  • 123
4
votes
8 answers

Commercial-grade randomization for Poker game

I need some advice on how to tackle an algorithmic problem (ie. not programming per se). What follows are my needs and how I tried to meet them. Any comments for improvement would be welcome. Let me first start off by explaining my goal. I would…
Tommy Fisk
  • 339
  • 4
  • 16
4
votes
3 answers

Java - How do I check for a straight in a poker hand without sorting?

This is not a duplicate. I understand how easy this is if you can sort, but I am not allowed to use the sort method for arrays and I am not allowed to write my own. I can't find any help with this anywhere, including StackOverflow. In this scenario,…
user2837136
  • 71
  • 1
  • 2
  • 6
4
votes
4 answers

Regex to calculate straight poker hand - Using ASCII CODE

In another question I learned how to calculate straight poker hand using regex (here). Now, by curiosity, the question is: can I use regex to calculate the same thing, using ASCII CODE? Something like: regex: [C][C+1][C+2][C+3][C+4], being C the…
Topera
  • 12,223
  • 15
  • 67
  • 104
4
votes
1 answer

Fastest way to create a lookup table in MySQL

I want to create a lookup table for the combinations of poker hands. There are 113million different possible hand combinations in a 7 card board. If I give each card a number say (1-52) and want to store each possible combination in the table, what…
Patchesoft
  • 317
  • 6
  • 21
4
votes
7 answers

Is Collections.shuffle suitable for a poker algorithm?

there is a poker-system in java, that uses Collections.shuffle() on all available cards before the cards are dealt. So a collection of 52 cards 2-9, J, Q, K, A in 4 types. After that we Collections.shuffle(). The problem is, that it seems (until now…
PassionateDeveloper
  • 14,558
  • 34
  • 107
  • 176
4
votes
4 answers

Coding a logical sub pot system for texas holdem poker

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…
User
  • 659
  • 2
  • 12
  • 29
4
votes
2 answers

Getting win percentages for Texas hold'em poker without monte carlo/exhaustive enumeration

Sorry I'm just starting this project and don't have any ideas or code, I'm asking more of a theoretical question than a programming one. It seems that every google search provides the same responses and it's very hard to find an answer to this…
3
votes
2 answers

Poker algorithm hand evaluator

I'm working on getting my Poker to evaluate the player hand. I can get the Flush and the jack or better pair to work but am running into problems figuring out how I would do the rest. Any suggestions on how I can evaluate the cards to the…
Josh Lake
  • 567
  • 1
  • 6
  • 17
3
votes
3 answers

Discord.js: interaction has already been acknowledged. Discord Buttons

I'm trying to make a Poker command for my Discord bot, and I want to implement turn system with Discord buttons. The command for now is: Someone uses the command The bot sends an embed with a button to join If join is pressed the player element…
clapmemereview
  • 371
  • 1
  • 4
  • 14
3
votes
6 answers

(How to manipulate)Poker Positioning using ENUM

Let's say I created the following class: public enum Position { Dealer(1), //1 SB(2), //2 BB(3), //3 UTG(4), //4 UTG1(5), //5 UTG2(6), //6 UTG3(7), //7 HJ(8), //8 CO(9); //9 //Constructor …
krikara
  • 2,395
  • 10
  • 37
  • 71
3
votes
2 answers

How to count longest streak per player

I have a mySQL poker database called TournamentXPlayer that contains a primary index called TournamentXPlayerID and TournamentID, PlayerID, Finish, and Payout. I've been looking at ways to count each players longest streak of finishing with a cash…
Terry Day
  • 53
  • 5
3
votes
3 answers

How can I speed up my Python poker hand vs. hand equity calculator

First a disclaimer: I am a medical professional who plays with both Python and poker as a hobby. I have no formal training in neither of those and I am not aware of what is in the curriculum of a computer science class. The computer that I use is a…
rioZg
  • 530
  • 1
  • 6
  • 17