|
-
May 27th, 2014, 01:13 PM
#1
Thread Starter
Lively Member
Sorting Listview by comparing values
I am having a little trouble figuring out a method of doing this. Basically, I have a listview that contains a bunch of poker hands. I have written a function to convert a text string into a hand. (Example: AS-2S-3S-4S-5S results in a straight flush.) I have also wrote a function to compare two hands to see which one wins. Now I need to cycle through my listview and sort the hands using my compare function. Since it is hard to reorder a listview, I thought maybe would be better to add a new column with a rank. The hand with 1 in the rank column would be the highest hand.
Right now, I'm just trying to wrap my head around the logic. Any help would be appreciated.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|