Hi all.
Here is a BAS module to do 5 card poker scoring. Its some ugly code but it works.
I have promised myself I was going to re-write this code for over a year but cannot seem to find the motivation as it works. Included is a sample project of how to call it.
Hope this helps someone out there.
poker_scoring.zip = sample project and BAS module
cards.zip = includes card graphics that are FREE to use
V0.91 - fixed bug in CheckStraightFlush and CheckRoyalFlush on what cards where used for scoring. Was: arrScoreCards = Array As Int(1,1,1,0,1) and needed to be arrScoreCards = Array As Int(1,1,1,1,1)
V0.92 - fixed bug in CheckStraight, It was not considering that an ACE was a legal card.
Here is a BAS module to do 5 card poker scoring. Its some ugly code but it works.
I have promised myself I was going to re-write this code for over a year but cannot seem to find the motivation as it works. Included is a sample project of how to call it.
Hope this helps someone out there.
poker_scoring.zip = sample project and BAS module
cards.zip = includes card graphics that are FREE to use
V0.91 - fixed bug in CheckStraightFlush and CheckRoyalFlush on what cards where used for scoring. Was: arrScoreCards = Array As Int(1,1,1,0,1) and needed to be arrScoreCards = Array As Int(1,1,1,1,1)
V0.92 - fixed bug in CheckStraight, It was not considering that an ACE was a legal card.
Attachments
Last edited: