I have a program for playing Video Poker, but ... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

I have a program for playing Video Poker, but ...

https://code.sololearn.com/cLGN9A6ZdaHB/?ref=app Now, I wish to move to the next level by making a program that allows you to play Texas Hold'em Poker with the computer... Since making an AI is impossible for me, I'll simply make the computer bet acc. to the card sequence. But on dealing the cards, checking the cards for the best hand will get difficult, as during the second turn, flop, I will have to check the sequence a lot of times, due to the permutations. So, how can I reduce the iterations?

7th May 2017, 11:50 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
2 Answers
+ 5
Please help me in this! /* Acc. to calculations. the last check ( after the river card is turned ) will require 7*6*5*4*3 iterations to cover all possible arrangements... And at the same time, I must note the max beneficial arrangement in a new array... This will slow the program up... */
7th May 2017, 11:50 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 3
Edit: I accidently calculated permutations where I needed combinations... So, the number of selections = 7C5 = 21... This won't be such a problem...
9th May 2017, 8:51 AM
Kinshuk Vasisht
Kinshuk Vasisht - avatar