I think irand should floor instead of round. First, when you want to generate a random number between 0 and 6 it’s often useful to exclude the 6. (See also https://www.cs.utexas.edu/~EWD/transcriptions/EWD08xx/EWD831.html).
Second, irand(0, 6) has a higher chance of rolling a 1 than a 0 because the capture area for 1 is [.5, 1.5), while the capture area for 0 is only [0, .5)
Also if you had chosen any other variable names, it wouldn’t have taken me 5 minutes to figure out what these things do.
And one more, if you had swapped the input parameters, and defaulted to n=0, you could call the use case “random number up to 6” with just rand(6) instead of rand(0, 6).
None of that matters in a private project, but… it just itched to point these things out.