I need help making a game
sorry to come off as harsh, but you’re going to need to expand a little bit. what kind of maze game do you wanna make?
There are a number of resources out there is what you’re looking for is an algorithm to create a maze. Wikipedia shows examples of several, including Kruskal’s and Prim’s. Both are dandy for building traditional single-solution mazes.
and if you want an algorithm to find a path through your maze have a look at http://codeatuts.blogspot.com.au/2012/09/15.html