maze solver doing dead-end filling