Then we move the values in terms of the most valuable digit, so AAAAB -> BAAAA.Four of A Kind can exist in two formats after sorted: AAAAB or BAAAA.We sort the cards to quickly identify the card type. Then we work with numerical values of the cards where 2 to A are represented by integers from 2 to 14. This can quickly identify the type of several hands. There are 7462 distinct poker hands so we created an algorithm that transforms a hand into an integer value.įirstly, we determine if the 5 card combination is suited/straight. To rank cards, we use a hexidecimal system to assign strength to the card from the most most significant card to the least significant card. In order to process data at a fast speed, all Card information are converted into numpy arrays to improve speed.Ĭard inputs are taken in the format of number: 23456789TJQKA followed by suit: dcsh.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |