mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Make random state choice in test more robust
`RNG.Next(int, int)` is max-exclusive, so the random state choice would actually never pick `MultiplayerUserState.Results` on its own. The only reason why that state ever did show up was by a freak accident of sorts (the logic in `TestRealtimeMultiplayerClient` would automatically convert every `FinishedPlay` state to `Results`, up until seeing the first player that was in the `Playing` state).
This commit is contained in:
@ -109,7 +109,7 @@ namespace osu.Game.Tests.Visual.RealtimeMultiplayer
|
||||
CoverUrl = @"https://osu.ppy.sh/images/headers/profile-covers/c3.jpg",
|
||||
});
|
||||
|
||||
Client.ChangeUserState(i, (MultiplayerUserState)RNG.Next(0, (int)MultiplayerUserState.Results));
|
||||
Client.ChangeUserState(i, (MultiplayerUserState)RNG.Next(0, (int)MultiplayerUserState.Results + 1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user