Javascript maze game