taxi simulator using coroutines

This commit is contained in:
Luciano Ramalho 2015-02-11 20:40:51 -02:00
parent 0327697a15
commit 07ef3cbece

View File

@ -91,8 +91,8 @@ class Simulator:
except StopIteration:
del self.actors[current_event.actor_id] # <12>
else:
self.events.put(next_event) # <14>
else: # <15>
self.events.put(next_event) # <13>
else: # <14>
msg = '*** end of simulation time: {} events pending ***'
print(msg.format(self.events.qsize()))
# END TAXI_SIMULATOR