mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Use MaxBy
in all locations that can and update inspection level to match dotnet-build
This commit is contained in:
@ -108,9 +108,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
||||
// simulate the server's automatic assignment of users to teams on join.
|
||||
// the "best" team is the one with the least users on it.
|
||||
int bestTeam = teamVersus.Teams
|
||||
.Select(team => (teamID: team.ID, userCount: ServerRoom.Users.Count(u => (u.MatchState as TeamVersusUserState)?.TeamID == team.ID)))
|
||||
.OrderBy(pair => pair.userCount)
|
||||
.First().teamID;
|
||||
.Select(team => (teamID: team.ID, userCount: ServerRoom.Users.Count(u => (u.MatchState as TeamVersusUserState)?.TeamID == team.ID))).MinBy(pair => pair.userCount).teamID;
|
||||
|
||||
user.MatchState = new TeamVersusUserState { TeamID = bestTeam };
|
||||
((IMultiplayerClient)this).MatchUserStateChanged(clone(user.UserID), clone(user.MatchState)).WaitSafely();
|
||||
|
Reference in New Issue
Block a user