How could i check to make sure the Ghost has passed the intersection it is currently at before running the code to choose a direction at an intersection? I used random numbers to randomize direction at an intersection for the ghosts but it sometimes just hangs at the intersection.

