• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

excaliburjs / Excalibur / 1238
84%
main: 89%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/site/webpack-dev-server-5.2.6
DEFAULT BRANCH: main
Ran 31 Dec 2016 08:45PM UTC
Jobs 1
Files 1
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1238

push

travis-ci

web-flow
[#538] Implement a better seeded Random  (#731)

Closes #538 

## Changes:

- 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)
- Added new utilities for random
  * Random in range (`ex.Random.floating()`/`ex.Random.integer()`), 
  * Coin-tosses with variable outcomes `ex.Random.bool()`
  * Pick-one `ex.Random.pickOne(array)`
  * Pick-set `ex.Random.pickSet(array, numPicks, allowDuplicates = false)`
  * Random integer range generator `ex.Random.range(min, max, length)`
  * Dice roll helpers for d4, d6, d8, d10, d12, and d20
- Tests for the random features included

Additionally 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).

5013 of 7094 relevant lines covered (70.67%)

344.85 hits per line

Coverage Regressions

Lines Coverage ∆ File
1711
100.0
build/dist/excalibur.js
Jobs
ID Job ID Ran Files Coverage
1 1238.1 31 Dec 2016 08:45PM UTC 0
70.67
Travis Job 1238.1
Source Files on build 1238
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1238
  • c2c042bb on github
  • Prev Build on master (#1224)
  • Next Build on master (#1247)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc