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

Poker hand history as an XML file, what language to use and how to begin manipulation

Hello Stack Overflow users, I am a semi-professional online poker player who isn't good enough to leave his day job. I am teaching myself to write code using treehouse and devslopes for the purpose of being able to write my own poker tracking data.…
0
votes
3 answers

Making a list of all possible 5 card poker

I'm trying to make a list of all possible 5 card poker hands to use in some computations (that may be slow but is preferably somewhat speedy). Now to get a list, I wrote the following code: import itertools # All possible Cards: cards = ['2s',…
Mitchell Faas
  • 430
  • 6
  • 19
0
votes
3 answers

How to prevent repeated random values?

The CPU and User is getting repeated cards. I've used the shuffle function, as well as pop. Is there a way to prevent useer and CPU from getting repeated cards. Here is an example of the program compiled Here are your cards: 1) The 10 of Clubs 2)…
0
votes
1 answer

Javascript get correct Number from numbers in card stack

I'm calling getNumber with a number from 1 -51 in a card stack, that is representing a card. But I'm seeing a lot of getNumber results in getting 0 and 1 as value. For example, card with number 13 would return 0 in getNumber function. while 39…
maria
  • 207
  • 5
  • 22
  • 56
0
votes
1 answer

Creating a discard poker card method in python

I'am creating a discard method that remove one or several cards(indicated by the user) in a hand and replace them with card from the deck. I had a list of all the cards in my list and I created a window, the buttons, and an Entry box. What I planned…
0
votes
0 answers

Evaluating a Straight in Visual Basic

Okay so I've been trying to debug this for hours and today and last night. I need to create a simple array(3,12) and use it to evaluate a 5 card poker hand. The problem is that it never returns a "TRUE" Boolean for anything above a 4 of a kind,…
XERO40
  • 11
  • 2
0
votes
2 answers

Java. Discard cards in poker using an array of indices

I am trying to write code for a poker game to delete cards at certain indices using an array. The code i have so far is the following and is not working. ncard is the number of cards currently in the hand. any help would be appreciated. /** *…
0
votes
2 answers

Algorithm that gives hand strength in poker

I am trying to find a way to calculate the strength of a hand, specifically how many unique hands (of the 169 starting hands) have a higher chance of winning at showdown given a complete or incomplete board (holdem). I've tried to do this a few ways…
Ben Arnao
  • 88
  • 1
  • 9
0
votes
2 answers

Poker Hand evaluation through LINQ

I am creating a poker game - Texas Holdem (5 cards on the table and 2 cards for myself). I've already created flush, straight and straight flush functions and I got stuck on evaluating if the hand has a: 1. Four of a kind 2. Three of a kind 3. Full…
0
votes
1 answer

How can I better optimize a search in possible Fantasyland constructions in Pineapple poker?

So, a bit of explanation to preface the question. In variants of Open Face Chinese poker, you are dealt one and one card, which are to be placed into three different rows, and the goal is to make each row increasingly better, and of course getting…
0
votes
2 answers

Why is my method only returning one of the duplicates that exist in my ArrayList?

I'm creating a poker game in Java, as of right now I am trying to find duplicate ranks in an ArrayList and printing them. My ArrayList (cards) contains ["3c", "3s", "Ad", "6h", "7h", "7s"]. When I use the method I've created String…
Yoleaux
  • 49
  • 6
0
votes
2 answers

Sorted() function not doing what I want it to

I'm creating a program that ranks poker hands. I want to sort each hand by number value of cards before ranking to make it easier but am having issues getting the sort to work. It sorts every letter in the self.deck instead of the individual…
Bailey
  • 1
  • 1
0
votes
0 answers

How do I use a switch statement to pass values from an enum to a method? Attempting to create a Java Poker Game

Enum Class public enum Suit { CLUB(0, "Clubs"), DIAMOND(1, "Diamonds"), HEART(2, "Hearts"), SPADE(3, "Spades");} private Suit(int sNum, String sName){ setsuitNumber(sNum); setsuitName(sName); public String…
Yoleaux
  • 49
  • 6
0
votes
1 answer

Poker: Holdem package straight1 function?

say x is a holdem hand (board + hole cards) where J:A = 11:14 and A may = 1. Suit doesn't matter. You're just checking for a straight. x <- c(2,5,6,7,8,9,14) This is the straight1 function from the holdem package. I understand everything but the…
R Curti
  • 31
  • 5
0
votes
3 answers

Finding four of a kind in a 5 card game

I am trying to find four of kind in a 5 poker hand. I don't know where I went wrong, but the JUnit is reporting it's wrong. public boolean hasFourOfaKind(String hand) { int counter = 0; char x = 0; for (int i = 0; i < hand.length();…
Heniam
  • 68
  • 16