+ Reply to Thread
Results 1 to 7 of 7

Macro to Sort Poker Hands

  1. #1
    Registered User
    Join Date
    03-16-2005
    Posts
    4

    Question Macro to Sort Poker Hands

    Hi
    New to the forum, hopefully you all can help!
    I would like to create a macro to sort up to 100 hands of 5 card poker. I've tried some different ways but all seem error prone and overly complex.

    any ideas, suggestions?

    Thanks!
    Kevin

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello KevinC,

    Not sure what you want to do. When you say "sort" do you mean shuffle the cards, deal the cards or play the hands? Repost with a little more info.

    Thanks,
    Leith Ross

  3. #3
    Registered User
    Join Date
    03-16-2005
    Posts
    4

    More Detail

    Thanks for the reply..
    Basically, having entered 100 or so hands into 100 rows (or columns), i'd like to go through each hand and sort them from best hand to worst hand. Date could be entered in a number of different ways....0-51 for each card, or a letter and a number for suit and card number (respectively). Data entry and format is flexible.

    Thoughts?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hi again,

    From a programming point of view numbers are usually preferable to ease of manipulation and speed. This is a intriguing challenge. Sorting the hands would be best handled by predeterminig the combinations, since numerical order isn't important. Place them in an array based on best to worst. It may be possible to construct a hash table based on the hand to select the ranking that way. Later the numbers could be "decoded" and presented in typical card suite fashion using Monotype Sorts or WingDings fonts.

    Leith

  5. #5
    Registered User
    Join Date
    03-16-2005
    Posts
    4

    Reply

    Thanks for the reply...
    It seems simple on the surface, but the more i've gotten into it, the more difficult it is!
    I'm relatively new and, to be honest, have no idea what a hash table is. I have to keep things simple. I appreciate the help either though!

    Any other thoughts?

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hi Kevin,

    I think you need some code examples to get you started in the right direction. Let me work on this today, and I can contact you by private message or you can contact me, either by private message or email at [email protected].

    Sincerely,
    Leith Ross

  7. #7
    Registered User
    Join Date
    03-16-2005
    Posts
    4

    Thanks

    Thanks for the reply. Look forward to discussing further in detail.

    Kevin

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1