#get head block number, better than irreversible
blockNum = blockchain.get_current_block_num()
print('Block number: {}'.format(blockNum))
userGuess = userRoll
seed(blockNum * (userGuess + 1))
diceRatios = btsDiceRatios
winRatio = diceRatios.get_ratio(userGuess)
value = randint(1, 100)
correctGuess = value < int(userGuess)
If everyone would prefer, I can post the code to github but I am embarrassed by it right now, it is very sloppy. The random number logic is above. The only thing that the rest of the code does is interface with the chain.
I would gladly have someone audit the code if they want.