Only print "Available conditons:" section if conditions are available

master
BodgeMaster 2023-01-06 15:10:45 +01:00
parent ea4e8f0248
commit ab0912b968
1 changed files with 2 additions and 1 deletions

View File

@ -515,6 +515,7 @@ def setup_and_run_task(start_field, start_position, start_heading, text, allowed
draw_field()
print("\n"+text)
print("\nAllowed commands: "+", ".join(allowed_commands))
if len(allowed_conditions)>0:
print("\nAvailable conditions: "+", ".join(allowed_conditions))
result = evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions))
print(result)