| 22 | submission: str = "client/player.py" |
| 23 | |
| 24 | def __init__(self, config, **kwargs): |
| 25 | super().__init__(config, **kwargs) |
| 26 | self.num_players: int = len(config["players"]) |
| 27 | self.run_engine: str = ( |
| 28 | f"python engine/main.py --port {HB_PORT} --players {self.num_players} " |
| 29 | f"--sim --sim-rounds {self.game_config['sims_per_round']}" |
| 30 | ) |
| 31 | # Game timeout is number of sims * bot timeout |
| 32 | self.timeout = self.game_config["sims_per_round"] * HB_BOT_TIMEOUT |
| 33 | for arg, val in self.game_config.get("args", self.default_args).items(): |
| 34 | if isinstance(val, bool): |
| 35 | if val: |
| 36 | self.run_engine += f" --{arg}" |
| 37 | else: |
| 38 | self.run_engine += f" --{arg} {val}" |
| 39 | |
| 40 | def _construct_game_script( |
| 41 | self, |