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

How can I take a string and differentiate it in different strings each one with 2 characters?

I was trying to do a program that analyzes poker hands, however I am extremely confused and I don't know where to start. The suits are represented by the letters C(clubs), D(diamonds), H(hearts) and S(spades). The value of the cards is represented…
0
votes
4 answers

Code to count how many occurrences of an element are found in a string java

I have this code here and it makes sense to me that it would print out how many instances occur in the array of the element at array[i]. The count never goes above one, what am I doing wrong? import java.util.Scanner; public class poker { public…
javabeginner
  • 83
  • 1
  • 10
0
votes
1 answer

Find the best cards to complete a partial poker hand

I'm trying to find an efficient solution for the following question: Terminology: Rank: 1-13 where 11=Jack,12=Queen,13=King Suit: H=Hearts,C=Clubs,D=Diamonds,S=Spades "WishCard": a card that can wear any Rank/Suit according to the player's wish…
Etian Chamay
  • 185
  • 1
  • 1
  • 10
0
votes
0 answers

Evaluating Poker hands texas holdem Issue

I am having issues getting the correct solution to an online problem where I am getting more instances of player 1 winning than player 2 winning. Could you please look at my code and find the issue thanks. I know that this code is complete trash but…
0
votes
0 answers

Probability of getting a particular card in Poker

Suppose, I am playing a poker match. I have a pair of 5 in hand and see that the there is no 5 in the first 3 drawn cards. What is the probability that there will be at least one 5 in the next two cards. My solution: {P(5 in the fourth card and a…
enamul17
  • 159
  • 2
  • 3
  • 14
0
votes
0 answers

VBA poker game - 424 error using vbcards.ocx

I bought a surface Pro recently with Office 365 and decided to write a poker game to learn how to code in VBA. I have it running but then decided to learn how to use pictures. So I downloaded vbcards.ocx and referenced it to my project. I have a…
0
votes
0 answers

Monte Carlo Tree Search random choices

My IS-MCTS implementation chooses always to go allin and i dont know why. Maybe you guys can help me? Ive already tried to change the saved value in the node from wins to value, which means the earned chip amount, but got bad results too. The…
maronjan
  • 11
  • 4
0
votes
0 answers

Dack/Card array duplicating between Hands and Poker Board

EDIT: I have partially resolved the issue. I had previously removed the for loop fro it's own method and put it into main for it to work, but for some reason it was not working this time. That's because a new Cards object was being initialized…
0
votes
1 answer

How can I add a new Player?

I have an assignment to do a Pokergame in Java and I am experiencing some trouble with establishing a Button to add a new Player. I have a constant NUM_PLAYERS public class PokerGame extends Application { public static final int NUM_PLAYERS =…
0
votes
3 answers

Classifying Poker Hands in Java

I am currently working on a CS project that classifies player's hands. I solved the first half of the project to print out the deck, shuffled deck and the hands of player1, player2 and remaining deck. The problem comes up when I have to evaluate the…
0
votes
0 answers

I am trying to make a program that plays only a certain range of poker hands. for example AA, AK, AQ etc

I have written a program that randomly generates a hand consisting of two cards. I want it to generate hands until certain combinations occur eg. a pair or a premium hand such as AK, AQ or KQ. I have already covered the possibility of a pair being…
0
votes
5 answers

How to check for two identical numbers in a single line of input

I am making a poker game in java using eclipse, I need help with creating a code to find a PAIR for a single line of input. If the user enters: 12,11,5,2,12 then how can I identify if the input has two of the same numbers then print it as a PAIR. So…
0
votes
1 answer

Python: How to pretty print the cards

I just started learning python and then this card game came out and I had no idea what to do. Basically, I need to create a for-loop inside of which I ask the user for card:. Most importantly, I need to define a function outside of main(), like def…
xianyu
  • 1
  • 1
0
votes
2 answers

Calculate probability of a flush in poker

I have the code to keep going through a loop until a flush is made. now I am trying to make it where I use count to show how many hands are dealt then divide by one to get the probability. For the code i have right now using count it returns it as…
l.m
  • 131
  • 1
  • 10
0
votes
1 answer

Checking if a flush poker python

I am trying to append random values and hold it in another value from a dictionary. As for a flush you need to clarify suits, so I did so for the dictionary, then I wanted to add random values between 1-14 for a hand of five cards to see if it is…
l.m
  • 131
  • 1
  • 10