| 26 | } |
| 27 | |
| 28 | def __init__(self, config, **kwargs): |
| 29 | super().__init__(config, **kwargs) |
| 30 | |
| 31 | # Get time control from config |
| 32 | time_control = self.game_config.get("args", self.default_args).get( |
| 33 | "time_control", self.default_args["time_control"] |
| 34 | ) |
| 35 | |
| 36 | # Build base Fastchess command |
| 37 | self.run_cmd_base = f"fastchess -each tc={time_control}" |
| 38 | |
| 39 | # Store time control for reference |
| 40 | self.time_control = time_control |
| 41 | |
| 42 | self.logger.debug(f"Initialized ChessArena with time control: {time_control}") |
| 43 | |
| 44 | def validate_code(self, agent: Player) -> tuple[bool, str | None]: |
| 45 | """ |