![]() |
|
Request to open source - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: General (https://sinister.ly/Forum-General) +--- Forum: The Lounge (https://sinister.ly/Forum-The-Lounge) +---- Forum: Random Discussion (https://sinister.ly/Forum-Random-Discussion) +---- Thread: Request to open source (/Thread-Request-to-open-source) |
Request to open source - Nil - 08-19-2017 Can we open source the betting system? ![]() I have about a 7-35 record. RE: Request to open source - Oni - 08-19-2017 Unfortunately, luck sometimes works that way. RE: Request to open source - Inori - 08-19-2017 Something something mt_rand, something something PHP is bullshit sometimes. RE: Request to open source - mothered - 08-19-2017 (08-19-2017, 04:17 AM)Inori Wrote: Something something mt_rand, something something PHP is bullshit sometimes. Agree. It's algorithm can be cruel sometimes. RE: Request to open source - Nil - 08-19-2017 I'd just like to check the source code. Code: if better != @God
if randomNum%2 == 0
playerOne wins
else
playerTwo wins
else
@God losesRE: Request to open source - Oni - 08-19-2017 Code: // Won or Lost?
$win = mt_rand(0, 1);Spoiler:https://en.wikipedia.org/wiki/Mersenne_Twister RE: Request to open source - Nil - 08-19-2017 (08-19-2017, 07:32 AM)Oni Wrote:Thanks for changing it and sharing the new code. Just won two bets in a row. RE: Request to open source - Blink - 08-20-2017 (08-19-2017, 07:32 AM)Oni Wrote: I'm pretty sure the Mersenne Twister was broken. https://www.bishopfox.com/blog/2014/08/untwisting-mersenne-twister-killed-prng/ https://github.com/kmyk/mersenne-twister-predictor |