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

Regex doesn't read multiple lines correctly in C#

i faced few problems trying to capture info from text file via REGEX in C#. Here is an example of the code and the string: string pattern = @"([\w\d]+) Hand #([\d]+): Tournament #([\d]+),…
0
votes
0 answers

not sure why a pandas df won't output

I am pretty new to python/esp pycharm and some of its popular packages, but I"m not sure why the below code won't return the pandas dataframe that I intended for. For background, I downloaded a poker dataset but when I return the code shown I just…
sahb
  • 1
  • 1
0
votes
0 answers

How to access values from an array of hashes - Ranking poker hands in Ruby

@hands = [ [{"suit": "heart", "value": 5},{"suit": "heart", "value": 8},{"suit": "spade", "value": 1},{"suit": "club", "value": 5},{"suit": "diamond", "value": 5}], [{"suit": "club", "value": 1},{"suit": "club", "value": 3},{"suit": "club",…
0
votes
1 answer

How to Limit the content of the list when printed?

How can I fix the "input ==1:" on line 19 problem such that if i input "1" it must have an output of A-C,2-C,3-C,4-C,5-C,6-C,7-C,8-C,9-C,10-C,J-C,Q-C,K-C This is my trial and error code for this problem from typing import List, Any import…
0
votes
1 answer

Method is not appending to list like other similar methods

I'm a beginner at pyhton. i'm working on a poker game. currently i'm stuck at dealing every player two cards. dealing the flop, turn and river work fine but dealing the player cards doesn't work. I don't understand why it doesn't work. Any…
0
votes
0 answers

4 to a Straight and 3 to a Straight in Video Poker

I'm creating a Poker 5-cards Hand Evaluator out of a regular 52-card deck, and evaluate the perfect strategy to take based on a ranked list. Included in this list are possible combinations such as "4 to a Straight Flush", "4 to an Outside Straight",…
m_botto
  • 67
  • 5
0
votes
1 answer

Why does my program keep dealing duplicate cards? (JAVA)

so for a homework task I have to make a program that deals N(command line input) amount of poker decks (5 cards). I have a for-loop that checks if a card has been used, but nonetheless duplicate cards get printed. Any help would be greatly…
0
votes
1 answer

Pythonic way to write a Poker function to prescribe dealer and blinds based on winner

I'm coding a Poker project and have just written a function to rescribe dealer, small and big blinds based on winner (pre-game). The code works, but it doesn't look pythonic: players = {1:'Jose',2:'Sam',3:'John',4:'Victor'} ## Each player receives a…
VovaNapas
  • 3
  • 2
0
votes
1 answer

What is optimal algorithm of "random card distribution (Poker game)"?

What is the optimal algorithm of "random card distribution (Poker game)"? I'd like to build a program that can distribute playing cards evenly with respect to their numbers and suits to the 4 players in a Poker game. In other words, all 4 players…
June
  • 1
0
votes
0 answers

The poke game and judge the suits

I want to solve a problem that is about the poker game. The player needs to type the rounds he wants to play and there are five cards dealt randomly each round. The programming needs to judge the five suits, including straight flush, four of a…
0
votes
1 answer

How to get the probability of getting a flush of a certain suit if dealt x amount of cards and knowing the composition of the deck?

Heres the scenario: Let's say we get dealt 17 cards and want to know the probability of getting a flush (five cards of the same suit) that can only be spades. No other suit matters. We know that one spade in the deck was taken out. So that leaves us…
RoyGBivJr
  • 143
  • 3
  • 7
0
votes
1 answer

Python Bubble Sorting with an array of objects

I'm attempting to sort a "hand" array of card objects for a texas-hold-em game in Python, where the card objects hold three values: strings for suits, strings/integers for values, and integers for their "ranking" when checking for straights. class…
0
votes
1 answer

C++ poker handrange combo removal

the calling ranges are stored in a function like this where KK+ means pocket pairs KK and better const char* prw_preflop_ICMrange[] = { "AA+", "KK+", "KK+,AKs", } I would like to write a function that would remove the card combos of my own holding…
g3wtter
  • 13
  • 3
0
votes
0 answers

Best way to find the best hand out of 21 possible combination without using brute force

/* -------------------------------------------------------------- Contains method to evaluate the strength of Poker hands I made them as STATIC (class) methods, because they are like methods such as "sin(x)", "cos(x)", that evaulate…
Sayaman
  • 1,145
  • 4
  • 14
  • 35
0
votes
1 answer

Generating all 5 card poker hands with Python

I saw this question: Generating all 5 card poker hands, but I was programming in Python. I had written my own logic to generate all the possible combinations, but it was running a long time, and although I made sure cards 2 through 5 didn't repeat…
NealWalters
  • 17,197
  • 42
  • 141
  • 251