{"push_id":1479311761,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"c2c042bb72d0f07dd84918ae9d7ed2766f727203","before":"f638d4ae4ea2754c5957d926a1d2320fd2a40e4f","commits":[{"sha":"c2c042bb72d0f07dd84918ae9d7ed2766f727203","author":{"name":"Erik Onarheim","email":"de2325ce3a4ffcc78dfa5f6099ecef4eb657fe6f@gmail.com"},"message":"[#538] Implement a better seeded Random  (#731)\n\nCloses #538 \r\n\r\n## Changes:\r\n\r\n- Implements a seeded random utility in Excalibur called `ex.Random` using the popular Mersenne-Twister algorithm documented [here](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html) and [here](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html)\r\n- Added new utilities for random\r\n  * Random in range (`ex.Random.floating()`/`ex.Random.integer()`), \r\n  * Coin-tosses with variable outcomes `ex.Random.bool()`\r\n  * Pick-one `ex.Random.pickOne(array)`\r\n  * Pick-set `ex.Random.pickSet(array, numPicks, allowDuplicates = false)`\r\n  * Random integer range generator `ex.Random.range(min, max, length)`\r\n  * Dice roll helpers for d4, d6, d8, d10, d12, and d20\r\n- Tests for the random features included\r\n\r\nAdditionally I have compared this implementation to the native C implementation done by the people who originally proposed the paper and it returns the same values for a seeded sequence as our implementation does. (downloaded and compiled locally using windows subsystem for linux).","distinct":true,"url":"https://api.github.com/repos/excaliburjs/Excalibur/commits/c2c042bb72d0f07dd84918ae9d7ed2766f727203"}]}
{"actor":{"display_login":"eonarheim"}}