assume for my match-making there is only one variable. and that is XP for example, i only need to sort players in the match-maker pool and give nearest number as selected opponent.
I assume these players with the given XP are waiting for a match.
1-5-10-25-10
My player’s XP is 4. It should be matched with XP 5. If 5 does not exist, it should match with 1. If 1 does not exist, it should match with 10, and so on.