Closed thunderrabbit closed 4 years ago
Instead of the tiles array which spells out the order of tiles
tiles = [G.TYPE_PANDA,G.TYPE_BEAR,G.TYPE_DOG,G.TYPE_PANDA]
Do something like
tile_percentages = {G.TYPE_PANDA = 70, G.TYPE_DOG = 30, G.TYPE_CAT = 10, }
The percents do not even have to add up to 100. Just add them all up, roll a random number between 1 and 110 and see which tile it should be.
Oh, except because G.TYPE_PANDA is 0, this format will not work. Will have to make a converter from text to id unless one exists already.
Instead of the tiles array which spells out the order of tiles
Do something like
The percents do not even have to add up to 100. Just add them all up, roll a random number between 1 and 110 and see which tile it should be.
Oh, except because G.TYPE_PANDA is 0, this format will not work. Will have to make a converter from text to id unless one exists already.