I'm looking for a way to hold scores for players for a highscore.
A typical input :
map.put(p1, 9);
map.put(p2, 7);
map.put(p3, 9);
Now I need a way of ordering the map so to be able to see the order of players based on their scores. However, I've tried just sorting based on the value of the map but then I lose cases where two or more players have the same score.
Is a map even the best way to do this or should I try a different data type? All I need is a way to order players based on their scores.
Map<Integer, List<Player>>for each game?