MCPcopy Create free account
hub / github.com/CodeClash-ai/CodeClash / _round_num

Function _round_num

codeclash/replay/base.py:109–111  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

107# --------------------------------------------------------------------------------------
108
109
110def _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

Callers 1

discover_gamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected