Make lists of allowed commands/conditions print properly

master
BodgeMaster 2022-12-23 12:17:21 +01:00
parent 31981b541e
commit 9e9fb38b60
1 changed files with 2 additions and 3 deletions

View File

@ -514,10 +514,9 @@ def setup_and_run_task(start_field, start_position, start_heading, text, allowed
field = start_field
draw_field()
print("\n"+text)
print("\nAllowed commands: "+" ,".join(allowed_commands))
print("\nAvailable conditions: "+" ,".join(allowed_conditions))
print("\nAllowed commands: "+", ".join(allowed_commands))
print("\nAvailable conditions: "+", ".join(allowed_conditions))
print(evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions)))
#TODO: return information about success or failure
def debug_setup():
setup_and_run_task(empty_field, [1,1], cursor_east, "Debug mode", ["step", "left", "right", "take", "repeat", "while", "if"], ["facing north", "facing south", "facing east", "facing west", "in front of wall", "goal reached", "on apple"])