implement Kruskal's algorithm for creating random mazes with minimum spanning trees