More specifically xor 2 initially hidden integers and mod X + 1 gives you a random number from 1 to X.
PS: Adding numbers mod X will provide a fair random number as long as at least one side provides a fair random number to start with. Which is a stronger guarantee if your making a real money wager.