This only adds the base logic for detecting collisions between vehicles. There's still a good amount of experimentation ahead to determine a good way for having vehicles wait behind other vehicles if they'd otherwise collide.
You can add this snippet to Traffic.step() for some basic collision debugging:
if self.collision_tracker.has_collision(v._id):
print(f"{v._id} has collision!")
Resolves #21.
This only adds the base logic for detecting collisions between vehicles. There's still a good amount of experimentation ahead to determine a good way for having vehicles wait behind other vehicles if they'd otherwise collide.
You can add this snippet to Traffic.step() for some basic collision debugging: