maze distance for corners