Hello! I am creating a riichi mahjong game(japanese poker-style game) where point is to create a hand of four sets of three and a pair. I’m on a good start but I am having problem with randomizing tiles and calculating points. I’ve tried

`var number = Random.Range`

but don’t really know what to put in as value. (Game has three types of main tiles (1 through 9 of balls, bamboos and characters) as well as dragons (red, green and white) and winds (south, north, east and west) four of each (111122223333444455556666777788889999 Red dragon x4 White dragon x4 Green dragon x4 EastWind x4 WestWind x4 NorthWind x4 SouthWind x4) which in total comes as 136 tiles.

`var number = Random.Range(1,137)`

doesn’t seem to be what I am looking when pulling hands from the wall (tiles are shuffled and placed on 17 tiles wide walls that are 2 tiles high in front of every player and then depending on dealer are drawn from that four at time, but that’s not the point.) Any pointers on how I should approach my dilemma?

Then as my next problem comes the scoring system. To win, person first needs at least winning point in his hand. There is set amount of ways to achieve this. (reference Wikipedia: Japanese Mahjong Yaku)

Now, every winning hand is valued differently depending on if the person who gets it is dealer, how many winning points he or she has etcetera. I am struggling insanely with getting program to understand different winning hands adding points together and subtracting them is not a problem, but the way I should handle them. Should I just create a variable for every single possible winning hand there is (which is insane) or is there any more logical way to handle this?

Sorry for messy explanation and I hope you understand what I am looking for with this. For reference I suggest just looking for wikipedia about how points are distributed and stuff if I did not manage to explain them clearly enough in this.

Also, sorry for messy English, not my native language!

Thanks in advance everyone!