Skip to content
Snippets Groups Projects
Commit 0ad1737f authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

bug fix in rendering

parent 01da99f3
No related branches found
No related tags found
No related merge requests found
......@@ -762,18 +762,12 @@ class RenderTool(object):
iAction = action_dict[iAgent]
new_direction, action_isValid = self.env.check_action(agent, iAction)
# ** TODO ***
# why should we only update if the action is valid ?
if True:
if action_isValid:
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction, color=oColor)
else:
# pass
print("invalid action - agent ", iAgent, " bend ", agent.direction, new_direction)
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction)
else:
if action_isValid:
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction, color=oColor)
else:
#pass
print("invalid action - agent ", iAgent, " bend ", agent.direction, new_direction)
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction)
self.gl.show()
for i in range(3):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment