(name: str)
| 107 | # -------------------------------------------------------------------------------------- |
| 108 | |
| 109 | |
| 110 | def _sim_index(name: str) -> int: |
| 111 | """Best-effort sim index from a filename: the last integer in its stem (``sim_18`` -> 18, |
| 112 | ``round_1`` -> 1), else 0. ``discover_games`` de-duplicates any collisions within a round.""" |
| 113 | nums = re.findall(r"\d+", name.rsplit(".", 1)[0]) |
| 114 | return int(nums[-1]) if nums else 0 |