Javascript maze game generator