I have two Hashmaps:
POINTS (String/int) Player A: 0 Player B: 3 Player C: 5 Player D: 2 Player E: 5 Player F: 3
TIME (sec) (String/int) Player A: 0 Player B: 15 Player C: 9 Player D: 8 Player E: 12 Player F: 15
The progrom should first order by the points, if two players have the same, the player with the longest time wins. If also that is identical, both players share a spot.
In that example:
1. Player E 2. Player C 3. Player F and Player B 4. Player D 5. Player A
Both hashmaps are already implemented (Key = Playername, Value = Points/Time). But how can I order them? Do I need to implement a comparator (how?)?
Thanks a lot