g.random(min, max)

Return a random integer between min and max, inclusive.

g.random(max)

Return a random integer between 0 and max, inclusive.

g.random()

Return 0 or 1, chosen randomly.