Fix condition_goal_reached() and condition_on_apple()
parent
cf311ae3fa
commit
5f6990050b
|
@ -112,13 +112,13 @@ def condition_in_front_of_wall(inverted):
|
||||||
|
|
||||||
def condition_goal_reached(inverted):
|
def condition_goal_reached(inverted):
|
||||||
if inverted:
|
if inverted:
|
||||||
return not 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[2]]==goal
|
return field[cursor_position[1]][cursor_position[0]]==goal
|
||||||
|
|
||||||
def condition_on_apple(inverted):
|
def condition_on_apple(inverted):
|
||||||
if inverted:
|
if inverted:
|
||||||
return not 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[2]]==apple
|
return field[cursor_position[1]][cursor_position[0]]==apple
|
||||||
|
|
||||||
# return value: "" or error message
|
# return value: "" or error message
|
||||||
def command_step():
|
def command_step():
|
||||||
|
|
Loading…
Reference in New Issue