Created
January 13, 2019 04:37
-
-
Save resilience-me/69d605844973df694c613ba71439a6fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRandomNumber(uint _treasureMap, uint _iterations) returns (uint) { | |
for(uint i = 0; i<_iterations; i++) { | |
_tresasureMap ^= blockhash(block.number % _treasureMap); | |
} | |
return _treasureMap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment