"AH" would be ace of hearts and it knows that should be in the last position of a zero-based array (which would be 12 because there are 13 cards in a suit). It parses the strings representing the cards i.e. There can only be 13 possibilities (2 - Ace). If anyone is curious about how it works it mainly relies on two initial tests - one will count how many numeric value cards there are in a given hand (i.e. With the results you can score hands and create a full game. It will also create the points and kicker scores. That said, the attached 3 script will evaluate any five or seven card hand and populate a text variable explaining what you have (i.e. I am sure others could code this more efficiently - some of you regex monsters could probably do it with 1 line. I am happy to report I was able to do so (though please tell me if you spot any bugs). I recently saw a post where someone was asking to get an old poker logic script working and it inspired me to dust mine off and get it operational.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |