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

Method name_for

codeclash/arenas/halite/replay.py:71–76  ·  view source on GitHub ↗
(owner: int)

Source from the content-addressed store, hash-verified

69 engine_names = d.get("player_names", [])
70
71 def name_for(owner: int) -> str:
72 if players and len(players) >= owner:
73 return players[owner - 1]["name"]
74 if len(engine_names) >= owner:
75 return engine_names[owner - 1]
76 return f"Player {owner}"
77
78 colors = {o: PALETTE[(o - 1) % len(PALETTE)] for o in range(1, num_players + 1)}
79 names = {o: name_for(o) for o in range(1, num_players + 1)}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected