Maze solving: Difference between revisions
Content deleted Content added
Line 1,553:
method visit(r,c)
critical region[r][c]: if 0 = iand(maze[r][c],SEEN) then {
maze[r][c] +:= SEEN
unlock(region[r][c])
return Position(r,c)
}
Line 1,562:
initially (m, l, p)
initial {
region := mutex(maze)▼
qMiceLock := mutex()
region := list(*m) # Minimize critical region size
every r := 1 to *region do region[r] := list(*m[1])
}
maze := m
|