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

Method get_available_trajectories

codeclash/viewer/app.py:716–727  ·  view source on GitHub ↗

Get list of available trajectory files as (player_name, round_num) tuples using metadata

(self)

Source from the content-addressed store, hash-verified

714 )
715
716 def get_available_trajectories(self) -> list[tuple]:
717 """Get list of available trajectory files as (player_name, round_num) tuples using metadata"""
718 metadata = self.parse_game_metadata()
719
720 # Get player names from agent_info
721 player_names = [agent.name for agent in metadata.agent_info] if metadata.agent_info else []
722
723 # Get round numbers from rounds data
724 round_nums = [round_data["round_num"] for round_data in metadata.rounds]
725
726 # Generate all possible (player_name, round_num) combinations
727 return sorted((player_name, round_num) for player_name in player_names for round_num in round_nums)
728
729 def analyze_line_counts(self) -> dict[str, Any]:
730 """Analyze line counts across all rounds for all files that appear in changed files"""

Callers 1

_render_game_viewer_implFunction · 0.95

Calls 1

parse_game_metadataMethod · 0.95

Tested by

no test coverage detected