Inifite growing maze using BFS in JS