Probably beside the point because I imagine the author just wanted to show a neat math-based solution, but in this situation with no dice available I've just used playing cards. If you want to simulate a 6-sided dice roll you grab cards 1-6 and shuffle, nice and simple