From 6b198ce11260e8a1884de26d27b67f0e9b21f2a3 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Tue, 30 Nov 2021 20:12:18 +0900 Subject: [PATCH] Document simulation --- .../OnlinePlay/Multiplayer/Match/Playlist/QueueList.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/Playlist/QueueList.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/Playlist/QueueList.cs index 6d4ea5c7fa..a783e66ee6 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/Playlist/QueueList.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/Playlist/QueueList.cs @@ -67,6 +67,10 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match.Playlist List result = new List(); + // Run a simulation... + // In every iteration, pick the first available item from the user with the lowest number of items in the queue to add to the result set. + // If multiple users have the same number of items in the queue, then the item with the lowest ID is chosen. + // Todo: This could probably be more efficient, likely at the cost of increased complexity. while (totalCount-- > 0) { var candidateItem = allItems