Generator 2 is based on sets. Initially all cells are in different sets. Then two neighboring cells are chosen and if they are in different sets, their sets are joined. If they were in the same set, a wall is built between them. This continues until the maze is complete.
All generators generate mazes with a certain 'characteristic'.
Clicking the mouse in the maze window controls it. LeftButton Clears the window and restarts maze. MiddleButton Pause or unpause the program. BUGS Expose events force a restart of maze. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Sun or MIT not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission.