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

Place pause between actions in tkinter

I am writing some code to play poker, and when the cards are dealt I would like a small pause between each card being shown. I have seen other answers which suggest using sleep or after, however I find that these pause the program but then show the…
0
votes
0 answers

How many different ways to split a set of poker into exactly 6 groups? And what might be the simplest way to solve this?

Well it's a simple question but I was wondering if there is a simpler way to solve this kind of question than Monte Carlo?
damuzexlxl
  • 11
  • 3
0
votes
1 answer

Poker - Finding if hand is straight flush?

I decided to challenge myself by creating a poker game. I am currently very confused with tuples and trying to use them properly. I am currently stuck trying to check if the hand (h) is a straight flush or not. Below is the code I am using to create…
0
votes
1 answer

convert code to python

I am learning python at the moment, and this is the kind of project that interests me. I don't know what language the script is written (lisp or autohotkey probably?), but I would like to convert it to python. Can you please point me in the right…
Jim Syyap
  • 1,625
  • 7
  • 20
  • 23
0
votes
2 answers

Poker moving dealer chip

I am making a poker game where I want to be able to customize the amount of players there are. I am trying to make a function that would move the dealer position to the next player at the table. I have a list of player objects and each have the…
0
votes
0 answers

Counting number of ways to of two 6 card hands & a cut, efficiently

I'd like to perform an exhaustive analysis of correct play for Cribbage, which has two six-card hands and a cut card. https://en.wikipedia.org/wiki/Cribbage In Cribbage in an end game position, suits can become entirely irrelevant. The key features…
thelawnet
  • 101
  • 1
0
votes
0 answers

Bit masking with predefined masks vs Bit shift operations?

I am a hobby programmer doing some things with Poker abstraction. I have cards encoded in 8 bits, the least significant half encodes the rank. the next two bits its suit-id (not suit per se, since then I would needlessly add complexity, It starts…
Some guy
  • 11
  • 4
0
votes
1 answer

Tensorflow 2.2.0 Reinforcement Learning - Gradients of model parameters are None

I'm trying to create a rudimentary Deep Q-Learning neural network for playing two-player heads-up texas hold 'em. The model must, for a given state, produce a probability distribution for the set of possible actions, which for this example have been…
0
votes
2 answers

Distributing side pots in poker

Hi I am developing a poker application and I am having some trouble distributing side pots. The main issue is that I don't know how to distribute chips of players who have folded(dead chips). Now my code does the following: Get the minimum bet of…
angelmc
  • 23
  • 2
0
votes
0 answers

Poker problem - Couldn't convert from 'int' to 'string'

I DONT WANT TO CONVERT ANYTHING :) I'm making a small copy of poker for myself. #include #include #include #include #include using namespace std; void welcome(); void rules(); void game(); void…
Juliano
  • 41
  • 6
0
votes
3 answers

Is it possible to decrement counter within a condition?

i am trying to detect a jokerStraightFlush when analysing a poker hand. I need to add a feature where this hand works 8S JK 6S JK 4S. The JK are jokers. I am using the exact same code logic as…
Lynn
  • 121
  • 8
  • 25
0
votes
2 answers

How do you write an advanced mutator method for arrays?

I'm relatively new to programming, so this is very confusing to me. In this program, I declared and instantiated an array of 5 card EMPTY SLOTS (from a program called Card.java in which all the cards are complete). This is my constructor method: …
Edward
  • 5
  • 3
0
votes
1 answer

c function to compare highest values of two different arrays (applied to tiebreaking highcard hands in poker)

#include int highcard (int array[]) { int i, j; int largest = array[0]; for (i=0; i<5; i++) { if (largest < array[i]) { largest =…
0
votes
2 answers

how to see if there are 1 or 2 poker pairs in a hand in C

I am trying to develop a C program that checks if there are 1 or 2 pairs in a 5 card poker hand. I am using a 5x3 array where every line is a card (the 3rd column being for the \0 character). Every time I execute the code it always shows the "two…
0
votes
0 answers

I have a problem using [k for k in list if "♦" in k]. I need help :(

I have a problem that i tried to solve but failed. I'm programming a calculator that can calculate your chances in poker. So i have my cards here: list = ["♦ Ace", "♦ 2", "♦ 3", "♦ 4", "♦ 5", "♦ 6", "♦ 7", "♦ 8", "♦ 9", "♦ 10", "♦ Jack", "♦ Queen",…