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
-1
votes
3 answers

I have an error that randomly happens when I input an int, does anybody know what's wrong?

Ok, so i'm making a blackjack game for an end of year project in school, but when i chose to "stand" in a game, the code could randomly ignore my input and then stop working all together. Can anyone figure this out? neither me nor my teacher could.…
Will P.
  • 1
  • 1
-1
votes
2 answers

How to see if an array has 4 of the same values. Java

I have a poker program and in that program I have method that checks if there is a four of kind in an array. public boolean isFourOfAKind(Card[] arr){} I change arr[] to an int array by grabbing each of the cards values, 2-14 and store them in a…
Sam Liokumovich
  • 91
  • 1
  • 2
  • 6
-1
votes
1 answer

Poker Game(best hand so far)

Hi everyone im having trouble with this poker game code I need to figure out how to display the best hand so far "Best hand so far: AH, AD, 2H, 7S, KC". For example, if i have a pair on the first game, then on the second game its two pairs or flush…
GermanB
  • 9
  • 3
-1
votes
1 answer

Java Poker Game

I am creating a java poker game so far I've got my program selecting random cards for the player, dealer and on the board (river). I now want my player to be able to input a value as a bet, I've though of using "Scanner bet = new…
FraserMunro
  • 31
  • 1
  • 5
-1
votes
1 answer

NoSuchElementException for my poker game Java

I could really use your help! I fixed most of the errors but im stuck on this one at the moment. Sorry for the long code and please let me know if you see any additional errors or mistakes i might have missed. I really appreciate your help <3 I…
-1
votes
4 answers

How come my straight counter remains at a value of zero?

I am making a program in the C90 standard using GCC in Ubuntu 10.04, that randomly generates a hand of 5 card structs and calculates if the hand is a flush, straight, etc. My function to calculate straights is: int isStraight(card hand[]) { int…
Benjamin
  • 345
  • 2
  • 3
  • 15
-1
votes
1 answer

Why is my hand counter resetting itself to zero?

I am creating a small application in GCC using the ANSI C C90 standard. My header file: #include #include #include #define DECKSZ 52 #define HAND_SIZE 5 #define STACKMAX 52 #define EMPTY -1 #define FULL…
Benjamin
  • 345
  • 2
  • 3
  • 15
-1
votes
3 answers

java Video Poker - Royal Flush never appears

I try to grograme a game called video poker. It's all most done, but Royal Flush seems to never appears. The card deck contains 52 cards, 13 of each suit. At the beginning of the game, the deck is shuffled. The player pays a token for each game.…
MaSa
  • 3
  • 2
  • 3
-1
votes
3 answers

Why won't my program work?

I have a java program that I had working perfectly, but somehow, overtime it failed. I'm really not sure how and I'm not sure why, so I'm hoping a new pair of eyes will help solve the problem. Please help, thanks! The program is a simple "poker"…
-1
votes
2 answers

How to rotate starting player?

I'm designing a multiplayer game of poker. I have Human and Computer objects, both which implement a Player interface which contains methods necessary to a poker player. I have an ArrayList of the players in the game, and I need to go to each player…
Talen Kylon
  • 1,908
  • 7
  • 32
  • 60
-1
votes
1 answer

Deciding who has won a hand of Poker in Java

What would be the best way to compare two (and only two) players hands in Java using the best combination for 5 cards out of 7 cards (texas hold'em)? If each card is assigned a value or enum then is there an alogirthm that can be used to decide who…
silverzx
  • 1,209
  • 4
  • 14
  • 18
-2
votes
2 answers

Which Parser can parse poker-log files, which one is the easiest and best? (Need alternative for Spirit. Gold Parser, ANTLR or ...)

I have to parse some pokerhandhistory-files, log files. The content is like this: Theplayername bets $100 All i need is the name, the action(as token) and the amount. The problem is that the name can also contain an action and spaces. Example:…
extreme001
  • 303
  • 1
  • 5
  • 16
-2
votes
2 answers

Probability to get pair from 5-card hand poker

I need to find a probability percentage to get one pair of cards from 5-card hand by simulation. So far I've made classes "Card" (functions: card value, suit, comparing to another card by value) and "Hand" (functions: addCard and isOnePair which…
coriden
  • 5
  • 3
-2
votes
4 answers

Enhanced For Loop not changing all elements of my array

I am currently working on a program that will roll 5 dice and store a random number for each dice in an array. My problem is my method is only changing the first element and leaving the rest of the elements as 0's. (Only rolling the first dice so to…
Toastuy
  • 3
  • 2
-2
votes
1 answer

POKERHANDS - How to I delete from list after the use

I have that code. And If I enter n argument is 3 it will be 3 hands. but I want to use any card only one time. totally there 52 cards. and each card can be use just one time. How to I delete the cards after the use? by the way, stdio.writeln is like…
Njx
  • 121
  • 6