Skip to content

Commit 65e1c46

Browse files
committed
Harden validation in battlesnake against false negatives
1 parent 39a9de8 commit 65e1c46

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

codeclash/games/battlesnake/battlesnake.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ def validate_code(self, agent: Player) -> tuple[bool, str | None]:
159159
bot_content = agent.environment.execute("cat main.py")["output"].splitlines()
160160
error_msg = []
161161
for func in [
162-
"def info() -> typing.Dict:",
163-
"def start(game_state: typing.Dict):",
164-
"def end(game_state: typing.Dict):",
165-
"def move(game_state: typing.Dict) -> typing.Dict:",
162+
"def info(",
163+
"def start(",
164+
"def end(",
165+
"def move(",
166166
]:
167167
if func not in bot_content:
168168
error_msg.append(f"There should be a `{func}` function implemented in `main.py`")

0 commit comments

Comments
 (0)