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:
Bartłomiej Dach 2020-12-22 21:16:45 +01:00
parent 5efc3b9496
commit 4a677ecc19

View File

@ -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));
}
});
}