| 69 | stats.player_stats[player].score = score |
| 70 | |
| 71 | def validate_code(self, agent: Player) -> tuple[bool, str | None]: |
| 72 | if self.submission not in agent.environment.execute("ls")["output"]: |
| 73 | return False, f"No {self.submission} file found in the root directory" |
| 74 | |
| 75 | bot_content = agent.environment.execute(f"cat {self.submission}")["output"] |
| 76 | |
| 77 | if "def get_move(" not in bot_content: |
| 78 | return ( |
| 79 | False, |
| 80 | f"{self.submission} must define a get_move(board, color) function. " |
| 81 | "See the game description for the required signature.", |
| 82 | ) |
| 83 | |
| 84 | return True, None |