Author Topic: Sort on multiple dimensions  (Read 249 times)


  • Playmaker Newbie
  • *
  • Posts: 10
    • View Profile
Sort on multiple dimensions
« on: October 15, 2019, 11:50:07 AM »
I need to sort on two values. In this case, each user will have a score and a time. I'd like to sort first by their score, and then in the case of ties, by their time. Is that something I can do using hash tables and array lists?


  • Administrator
  • Hero Member
  • *****
  • Posts: 15373
  • Official Playmaker Support
    • View Profile
Re: Sort on multiple dimensions
« Reply #1 on: October 15, 2019, 11:28:03 PM »

 yes, you can do that, I would for example do two arrays, one sorted by score and another by time.

 then when you build the final list you go through the score array, and when the same, you can check in the time array and use that order to decide who gets first.

It's cumbersome, I give you that.