Open Side Menu Go to the Top

02-16-2012 , 01:40 PM
I'm writing a Java poker program and I'm working on a discard function for it right now. There's a human player and an AI player. My program needs to have some artificial intelligence.

What I mean by this is when the AI player chooses whether or not they want to discard any cards or not they will look at the human players down cards.

For example... if (humanPlayers down cards = this and this)
Discard these...


The reason I need help with this is because I don't know how to play poker. Each player has 5 cards and 2 down cards, the AI player should discard cards after seeing what the human players down cards are so they can make a better decision.

If I could just get a few examples that would be great.
Thanks
Writing a Java poker program, need help with the Discard function Quote
Writing a Java poker program, need help with the Discard function
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Writing a Java poker program, need help with the Discard function
02-16-2012 , 11:33 PM
Moving to Programming from CTH.
Writing a Java poker program, need help with the Discard function Quote
02-17-2012 , 02:02 AM
You should have some function that would drawForFlush() or drawForStraight() unless the cards that make your straight are the same as the villains down cards.
Writing a Java poker program, need help with the Discard function Quote
02-17-2012 , 12:22 PM
Quote:
Originally Posted by JAVAplayer
Each player has 5 cards and 2 down cards, the AI player should discard cards
What game is this?
Writing a Java poker program, need help with the Discard function Quote
02-17-2012 , 12:42 PM
Quote:
Originally Posted by JAVAplayer
The reason I need help with this is because I don't know how to play poker.
Probably not the best foundation to write a poker program?
Writing a Java poker program, need help with the Discard function Quote
02-17-2012 , 01:52 PM
Quote:
Originally Posted by Cry Me A River
What game is this?
7 card stud with a programming error? :P
Writing a Java poker program, need help with the Discard function Quote
02-18-2012 , 05:16 AM
If I had a choice it wouldn't be poker but the assignment is to write a poker game. If it were up to me it would be something simple like go fish.
Writing a Java poker program, need help with the Discard function Quote
02-18-2012 , 05:47 AM
is blackjack poker? that ai would be easy and you could have it count cards =P
Writing a Java poker program, need help with the Discard function Quote
02-18-2012 , 04:05 PM
Quote:
Originally Posted by JAVAplayer
If I had a choice it wouldn't be poker but the assignment is to write a poker game. If it were up to me it would be something simple like go fish.
Then why are you inventing some weird 7-card stud/draw hybrid? Pick a straight-forward game like 5 card stud and do that instead. Hell, Blind Man's Bluff has been played at the WSOP. It doesn't get much simpler...
Writing a Java poker program, need help with the Discard function Quote
02-19-2012 , 11:01 PM
Quote:
Originally Posted by Cry Me A River
Then why are you inventing some weird 7-card stud/draw hybrid? Pick a straight-forward game like 5 card stud and do that instead. Hell, Blind Man's Bluff has been played at the WSOP. It doesn't get much simpler...
I'm not? I'm just following the instructions. The instructor said there's 5 cards and 2 down cards that the other player can see. I don't even know how to play poker so I didn't know whether or not this was right or wrong.
Writing a Java poker program, need help with the Discard function Quote
02-22-2012 , 03:36 PM
Maybe you should post the actual requirements.
Writing a Java poker program, need help with the Discard function Quote
Writing a Java poker program, need help with the Discard function
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
Writing a Java poker program, need help with the Discard function

      
m