This is still a workaround but arguably it's something we could leave in
place without much loss. I think this at least feels better than the
previous code.
Notably, you could argue the test coverage of the fail case is lower
since made it implicit that all tests will avoid the "backwards seek"
detections. But we never really had tests correctly- fail on the original
so I don't see any loss of value.
This continues on https://github.com/ppy/osu/pull/32770 via adding test
cases which cover treatment of hit windows in stable in osu!, taiko, and
mania. The test cases are exportable to beatmap `.osu` files and replay
`.osr` files for stable crosscheck by setting `ExportLocation` on the
test scene classes to a non-null path.
For the most part, osu! and taiko ground truth matches previous findings
- hit windows in those rulesets are floored to the nearest integer.
The real "star" of this diff is mania, because:
- The hit windows in mania depend on:
- overall difficulty (as expected)
- whether Score V2 is active
- if Score V2 is not active, the hit windows also depend on whether
the map was converted from another ruleset or not
- Regardless of all aforementioned factors, mania hitwindows are *not
symmetrical*. Due to what *appears* to be a straight-up bug, it is
*not possible to achieve a MEH / 50 hit result when hitting late*.
There is specific code that coerces late hits beyond 100 hit window
range to full misses:
https://github.com/peppy/osu-stable-reference/blob/996648fba06baf4e7d2e0b248959399444017895/osu!/GameplayElements/HitObjectManagerMania.cs#L737-L751
Note that despite the fact that I'm PRing these test cases, none of this
is a promise that all of stable behaviours will be returning unchanged
when I PR something to actually do something about this and the other
issue of replay instability. This is just coverage, to be used for
awareness of what's still broken. The extent of how much stable is going
to be humored here going forward will be subject to negotiation.
Beyond isolation, this stuff is also used to test (de-)serialisation.
Much-of-a-muchness in this case since it isn't too thoroughly tested,
but best do it anyway.
Removes storage of `selectedBeatmap` that was referenced through
multiple class-level methods.
To expound a bit, this structure felt better (or otherwise passing
`APIBeatmap` through methods) alongside removal of the `#nullable
disable`, otherwise each method would check `selectedBeatmap != null`.