We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Traffic Grid

Now that we have tiles, let's build a TrafficGrid class. This will be the class our search algorithm will use to move around the grid. For the sake of simplicity, we'll assume that movement is allowed between any two adjacent tiles. Essentially every tile is a 4-way traffic intersection, unless it's on an edge.

Assignment

Complete the __init__, in_bounds, and neighbors methods.