Commit 94685021 authored by Igor Dejanovic's avatar Igor Dejanovic

Fix in the robot example

parent 6a197bfd
...@@ -73,7 +73,7 @@ class Program(SemanticAction): ...@@ -73,7 +73,7 @@ class Program(SemanticAction):
if parser.debug: if parser.debug:
print("Evaluating position") print("Evaluating position")
position = [0, 0] position = [0, 0]
for move in children[1:-2]: for move in children:
position[0] += move[0] position[0] += move[0]
position[1] += move[1] position[1] += move[1]
return position return position
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment