Build a maze, then watch breadth-first search find the shortest route that collects every key. A lock opens only after its matching colored key is collected.
Change the number of rows and columns.
Move the grid, or scroll and pinch to zoom.
Add walls, a starting point, keys, and matching locks.