We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
randomNumber cannot be 0, because it's a random value between 0 and 2^256. In other words, the likelihood of getting 0 as random number is 1 to 115792089237316195423570985008687907853269984665640564039457584007913129639936, to give you the perspective. It won't happen.
"While a miner cannot freely choose the hash for a block, he may choose not to publish a newly found block hash → influence on the randomness." Tend to de cautious about this type of arguments. Miners are working in a decentralized manner and winning a chance to mine a block is not determinstic. I'm not sure if miners would simply give away a token winning opportunity just to not publish a newly found block hash. By doing so, he's not winning anything, no?
That's why I stated before 'So all good with using the future block hash? It depends! Are you allowing gambles with winning amounts higher than the block reward? Then be aware of miner manipulation.'
Is there a flaw in this condition checking
if (randomNumber != 0 || randomNumber % 2 == 0)? If `randomNumber` is 0, then the second condition is true, even though the first condition is false.