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

@Rednering: TODO=?

parent 53299edc
No related branches found
No related tags found
No related merge requests found
......@@ -218,7 +218,6 @@ class QTSVG(GraphicsLayer):
self.lwAgents[iAgent] = svgWidget
self.agents_prev[iAgent] = EnvAgent((row, col), iDirOut, (0, 0), old_direction=iDirIn)
self.layout.addWidget(svgWidget, row, col)
# print("Created ", iAgent, row, col)
def show(self, block=False):
self.wMain.update()
......
......@@ -764,12 +764,18 @@ class RenderTool(object):
iAction = action_dict[iAgent]
new_direction, action_isValid = self.env.check_action(agent, iAction)
if action_isValid:
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction, color=oColor)
# ** TODO ***
# why should we only update if the action is valid ?
if False:
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:
pass
# print("invalid action - agent ", iAgent, " bend ", agent.direction, new_direction)
# self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction)
self.gl.setAgentAt(iAgent, *agent.position, agent.direction, new_direction, color=oColor)
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