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

Function find_max_round_for_player

codeclash/analysis/code_evolve/main.py:69–74  ·  view source on GitHub ↗

Find the highest round number that exists for a player.

(log_folder: Path, player_name: str)

Source from the content-addressed store, hash-verified

67
68
69def find_max_round_for_player(log_folder: Path, player_name: str) -> int:
70 """Find the highest round number that exists for a player."""
71 player_dir = log_folder / "players" / player_name
72 changes_files = list(player_dir.glob("changes_r*.json"))
73 rounds = [int(f.stem.split("_r")[1]) for f in changes_files]
74 return max(rounds) if rounds else 0
75
76
77def _compute_code_sim_difflib(diff1: PatchSet, diff2: PatchSet) -> float:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected