Implementation of a maze generation algorithm.