This is how I wrote the answer on my my pad:

64 / 4 = 15.75

- 15

= 0.75

4 * 0.75 = 3

Answer 3 means Player 4 would go first.

I’ve lost track of the thread so will just come up with my own number, say 812.

812 / 4 = 203

- 203

= 0

4 x 0 = 0

Answer 0 means Player 1 would go first.

One more for luck, random number is 8349

8349 / 4 = 2087.25

- 2087

= 0.25

4 x 0.25 = 1

Answer 1 means Player 2 would go first.

I don’t know how to code any of this sort of thing yet.

If anyone else wants a random number to respond to, I pick ‘67 % 4’.