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
1 answer

five hand card game and couldn't figure out, badugi & four of a kind

am trying to find four of a kind in a five-card poker hand. but it's not working and couldn't figure out why. public boolean hasFourOfaKind(String hand) { int counter = 0; char x = 0; for (int i = 0; i < hand.length(); i++)…
Heniam
  • 68
  • 16
0
votes
1 answer

Calculating poker preflop equity efficient

I've read many articles about the Monte Carlo algorithm for approximating the preflop equity in NL holdem poker. Unfortunately, it iterates over only a few possible boards to see what happens. The good thing about this is that you can put in exact…
Bruno Zell
  • 7,761
  • 5
  • 38
  • 46
0
votes
2 answers

Classes and implementing them

So I am having some trouble with programming. I have a project that my professor wants us to make a poker game. We are supposed to have a Card class with public members: Constructer,ShuffleCard, GetCard(), and Thirteen void functions to display…
0
votes
2 answers

How do I compare two randomly picked arrays with earlier picks?

I'm trying to create a version of a poker, where the program hands out 2 cards to each player (6 of them). I've come up with a program that can pick 1 random card for every player, but the problem is that sometimes, 2 players get the same card. My…
FilipLIS
  • 3
  • 5
0
votes
4 answers

Sorting Card objects inside of the Hand object

I have almost everything ready for my poker game. What I want to do next is to sort cards in players hand by rank value. You know "two" is byte 2, "three" is byte 3 etc... This is my enum CardRank class public enum CardRank { TWO((byte)2,…
Matt
  • 27
  • 9
0
votes
2 answers

A poker card game in C. Please explain suits[4][9], and faces[13][6]?

So I have a sample code to create a deck of card for a mini poker game in c. But I do not understand how the suits and faces are determined. Why do these arrays have 2 dimensions? I know that [9] and [6] are the columns of the array, but I do not…
Quan Bui
  • 175
  • 1
  • 13
0
votes
1 answer

Python class example texas holdem efficiency

Hi am working on a simple texas holdem dealing simulator. I am new to python and was hoping to get some advice on my use of classes here. I feel like I am not using them as efficiently as possible, especially when dealing out the player cards.…
jason
  • 113
  • 3
  • 10
0
votes
1 answer

How to find all sequences of three in an array of values

first question ever here... I am coding a simple 3-card poker hand evaluator and am having problems finding/extracting multiple "straights" (sequential series of values) from an array of values. I need to extract and return EVERY straight the array…
LilGames
  • 89
  • 1
  • 10
0
votes
1 answer

Poker hand analyze and clean code

I have a question more about style rather than implementation. I'm working on poker application. It has a class storing all required data, like five cards. There is also second structure, which models the FigureAnalyzer - piece of code to determine,…
Treck
  • 69
  • 11
0
votes
1 answer

Programming a Poker Hand Calculator in C++

I've written a few hundred lines of code for a 5 card Poker Hand Calculator in C++ to practice using classes. Here is part of the member function I've written to compare two hands that are both TwoPairs. I've thoroughly tested all of my boolean…
TyManning
  • 125
  • 12
0
votes
3 answers

Planning Poker estimation by whole story or by task

We're planning to start with Scrum and preparing some stuff at the moment. We'd like to use planning poker for the refinement. But I can't find the information, if each member of the squad have to estimate the whole story or just his task like…
CollinG
  • 67
  • 3
  • 11
0
votes
2 answers

Training a neural net to predict the winner of a card game

In a made up card game there are 2 players, each of which are dealt 5 cards (standard 52 card deck), after which some arbitrary function decides a winning player. The goal is to predict the outcome of the game, given the 5 cards that each player is…
luna_
  • 312
  • 3
  • 15
0
votes
2 answers

Poker Hand Ranking loop combinations

So I'm currently making a hand ranking program for my own personal experience growth. However, how I want to do it is with a 5 card out of 7 card evaluation. So for example, I currently have an array with 7 values. I want to run 5 of the objects…
Daniel
  • 285
  • 3
  • 12
0
votes
4 answers

unpacking a string with list comprehension python

I got the following code. hand = '6C 7C 8C 9C TC'.split() so hand is now a list of strings ['6C', '7C', '8C', '9C', 'TC'] then ranks = ["--23456789TJKA".index(r) for r, s in hand] ranks is now [6, 7, 8, 9, 10] The aim is to give card's rank the…
0
votes
1 answer

Method of storing strings other than List

I'm developing a poker app and currently I want to store all the card combinations names I'm planning to use list and do something like this : private static List combinationNames = new List { " High Card ", " Pair ", "…
kopelence
  • 173
  • 1
  • 2
  • 9