Maze Generation with various algorithms in Angular.js