by drivers99 · 11y ago · 0 comments
g.piece = 1 + rand.Int()%numTypes
However, the official tetris guidelines say that the 7 types of pieces should all be selected in a random order, as if taken from a bag. After all 7 pieces are picked, you can put all of the pieces back in the bag and select again in a random order. [1]Of course, you don't HAVE to follow the official guidelines. I just thought it would be fun to compare.
However over the years, even after the guideline was instituted, there have been many different types of randomizers used. Of course, the original having none, and many a long the way having bugs.