I don't know if this is too pedantic, but you should use floor() with random() to generate random whole numbers.
round(random(1, 3)) will give:
1 to 1.5: 1
1.5 to 2.5: 2
2.5 to 3: 3
Note 2 has twice as big a range so is twice as likely to come up! If you want all numbers equally likely, use floor(random(1, 3)), which gives:
1 to 2: 1
2 to 3: 2
3 is now no longer a possible result, but at least 1 and 2 are equally likely to come up.