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
0
votes
5 answers

Why do I get this strange output Hand@2802cf63?

I'm not sure why I am getting this output. when I try to print a hand of cards for my poker program. I know there are lots of things I could use to make this more efficient like enums. but this is for a class so I am limited on what I can use. I…
user3769297
  • 179
  • 1
  • 2
  • 12
0
votes
1 answer

How to get my poker hand to print?

I am having some trouble getting my poker hand to print. I'm not sure if there is something wrong in the hand class or in my dealCard method in my deck class. When I try and run it, It just keeps running. It went over 4 minutes before I finally…
user3769297
  • 179
  • 1
  • 2
  • 12
0
votes
4 answers

How to shuffle two array for poker evaluator

I am working on a poker program. I am having some issues figuring out how to shuffle. I have to use arrays. I can't use enums or Lists. i know there are much better ways to make this program but the point is to understand arrays. I am having some…
user3769297
  • 179
  • 1
  • 2
  • 12
0
votes
2 answers

Computing unique index for every poker starting hand

As there are 52 cards in a deck we know there are 52 choose 2 = 1326 distinct matchups, however in preflop poker this can be bucketed into 169 different hands such as AK offsuit and AK suited as whether it is A hearts K hearts or A spade K spades it…
Aly
  • 15,865
  • 47
  • 119
  • 191
0
votes
1 answer

Which libraries can be used for creating a poker game?

There doesn't seem to be a good no-limit texas hold'em poker implementation on most Linux distros, I hope to change this and i've tried in the past to use the typical libraries (such as libgdx and its forks) but I feel these libraries are designed…
zeroRooter
  • 100
  • 1
  • 6
0
votes
0 answers

Dealing a Hand and Evaluating the possible ranks

import java.util.ArrayList; import java.util.Collections; /** * Write a description of class Deck here. * * @author (your name) * @version (a version number or a date) */ public class Dealer { private int numberOfDecks = 1; private…
0
votes
2 answers

sequential list for python poker program

I want to build a straight function for a Texas hold'em program. I've created some test values and want the function to return the list of cards that satisfy the straight. This is what I have so far: import…
0
votes
1 answer

Building a dictionary based on ranks

I'm creating a simplified program of Texas hold'em and I'm trying to create a function that builds a dictionary based upon the ranks of the cards. For example, if I have: H1: [6c, 2c, 6d, 6h, 2h, 6s, 3s] H2: [6c, 2c, 6d, 6h, 2h, 3s, Ad] I want to…
0
votes
1 answer

Why are my variables not incrementing?

I'm writing a small poker application in C and I have counters for the number of flushes, straights, etc. Main function: int main(void) { int i, j; int numHands = 0; int flushCount = 0; int straightCount = 0; int xOfAKindCount =…
Benjamin
  • 345
  • 2
  • 3
  • 15
0
votes
1 answer

Calculate Poker Hand

My charity does "Poker Runs" motorcycle runs where player go to each stop and pick a card. We are looking to make this an easier way to track the winners without having to manually sort through each card. I believe I have all other functions done,…
Jayce
  • 781
  • 3
  • 16
  • 35
0
votes
3 answers

get every two card combination from subset of standard deck

I have a standard deck of cards and then have removed a few, from the remaining cards I want to calculate all of the possible two card combinations. For example with 47 cards there is 47 choose 2 combinations. Can anyone think of an efficient way to…
Aly
  • 15,865
  • 47
  • 119
  • 191
0
votes
2 answers

Detect straight hand in poker

Ok, so, I have the method straight(ArrayList l) defined below. It works but I really want to improve it because my algorithm is running quite slow. The idea here is: get all value of the Cards and add them to an arraylist, then check whether…
Trung Nguyen
  • 459
  • 1
  • 5
  • 6
0
votes
3 answers

Java Array Index Out of Bounds somehow?

In my game's code, I am trying to add a card to hand. As soon as I do, my array is out of bounds. Everything looks right, but maybe I'm missing something. FYI, one and two are Player instances. Relevant code from Main class (sorry about the…
William
  • 23
  • 1
  • 5
0
votes
1 answer

Java Poker Program

I'm having trouble with my code. When I run it, the program keeps running, it won't stop. I'm not sure what I did wrong. I've gone over it but I haven't been able to figure it out. Someone please help! public void play() { /** * The main…
LC13
  • 37
  • 1
  • 4
0
votes
2 answers

Comparing in ArrayList Poker Game Java

Question (short version): How do I compare elements in an ArrayList to each other? I've got most of the basics of ArrayList down pretty well (add, get, set, size...). I'm having trouble stepping into the ArrayList to compare objects (playing cards'…
MikaelCMiller
  • 95
  • 3
  • 14