Skip to content

Commit 7f84dfa

Browse files
committed
Fix battlesnake entrypoint check to accept any server start; fix single_player doc ref
1 parent 7eb5f58 commit 7f84dfa

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

codeclash/arenas/battlesnake/battlesnake.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ def validate_code(self, agent: Player) -> tuple[bool, str | None]:
203203
error_msg.append(f"There should be a `{func}` function implemented in `{self.submission}`")
204204
if len(error_msg) > 0:
205205
return False, "\n".join(error_msg + ["Don't change the function signatures!"])
206-
if "__main__" not in bot_content or "run_server" not in bot_content:
206+
if "__main__" not in bot_content:
207207
return False, (
208-
f"`{self.submission}` must keep its server entrypoint so the bot starts: the "
209-
'`if __name__ == "__main__": run_server(...)` block at the bottom of the file.'
208+
f'`{self.submission}` must keep its `if __name__ == "__main__"` block that starts '
209+
"the server, or the bot fails to launch."
210210
)
211211
return True, None

docs/reference/tournament/single_player.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ players:
3030
## Running a SinglePlayer Tournament
3131
3232
```bash
33-
python main_single_player.py configs/examples/battlesnake_single_player.yaml
33+
uv run python scripts/main_single_player.py configs/examples/BattleSnake_single_player.yaml
3434
```
3535

3636
## Implementation

0 commit comments

Comments
 (0)