|
-
August 2nd, 2011, 09:02 AM
#1
Sorting question
What would be the best way to sort this string into descending order by score, i.e:
from:
-4: a7a5
-3: b7b6
-6: f7f5
1: c7c6
2: d7d6
12: e7e6
13: d7d5
10: g8f6
to:
13 d7d5
12 e7e6
10 g8f6
2 d7d6
1 c7c6
-3 b7b6
-4 a7a5
-6 f7f5
Will comparator work or is there an element of parsing involved to strip out the score, sort and then put back together again?
For info, this is the code that produces the string
Code:
jcb.showMessageDisplayAnalysis(score + ": " + move);
Thanks
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
|