Element 'maze generation algorithm'