I've been trying to figure out how I would go about creating a random game map for lets say a Match 3 game.
Basically I want a random set of numbers in a grid array when a game loads but it must be solvable. There's no point in setting up a random level of a match 3 game if the grid isn't solvable.
I had some ideas about checking what number is in the grid then adding the same number next to it with a gap then the same number again but it all goes wrong when it tries to do the same for the other number in that it overwites the other solution.
How do you guys do it?
Forgive me if this is not explained properly but I think you'll understand what I want and am trying to do. :)
Basically I want a random set of numbers in a grid array when a game loads but it must be solvable. There's no point in setting up a random level of a match 3 game if the grid isn't solvable.
I had some ideas about checking what number is in the grid then adding the same number next to it with a gap then the same number again but it all goes wrong when it tries to do the same for the other number in that it overwites the other solution.
How do you guys do it?
Forgive me if this is not explained properly but I think you'll understand what I want and am trying to do. :)