From 5f6990050b0355e3c5431b31403609a2ee8fd937 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Sun, 6 Nov 2022 03:30:03 +0100 Subject: [PATCH] Fix condition_goal_reached() and condition_on_apple() --- lambdaV.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lambdaV.py b/lambdaV.py index e40eeed..08ababb 100644 --- a/lambdaV.py +++ b/lambdaV.py @@ -112,13 +112,13 @@ def condition_in_front_of_wall(inverted): def condition_goal_reached(inverted): if inverted: - return not field[cursor_position[1]][cursor_position[2]]==goal - return field[cursor_position[1]][cursor_position[2]]==goal + return not field[cursor_position[1]][cursor_position[0]]==goal + return field[cursor_position[1]][cursor_position[0]]==goal def condition_on_apple(inverted): if inverted: - return not field[cursor_position[1]][cursor_position[2]]==apple - return field[cursor_position[1]][cursor_position[2]]==apple + return not field[cursor_position[1]][cursor_position[0]]==apple + return field[cursor_position[1]][cursor_position[0]]==apple # return value: "" or error message def command_step():