Random API
See original GitHub issueDice, shuffling etc. all require randomness, but having impure reducers (using Math.random()
, for example) breaks the ability to view earlier game states (and is an anti-pattern in Redux). We should use a seed in ctx
(that’s stripped away before sending it to the client) that is used to predictably generate random numbers.
Plan:
- API to generate random numbers.
- API for various die rolls.
- API to shuffle an array.
- Allow calling the Random API in
flow
code (only really supported inmoves
at the moment).
Issue Analytics
- State:
- Created 6 years ago
- Comments:31 (30 by maintainers)
Top Results From Across the Web
Random Data API
Random Data Generator. Generate random fake data and populate your application for easier development and testing. Get Started. It's Free. Random Data API...
Read more >62 Random APIs (2022) - ProgrammableWeb
Top Random APIs including APIs from .net Daily Fact, I Heart Quotes, Fairluck, Cat, Notable And Quotable Random Quote, Alagad Fortune, Anu Quantum...
Read more >Random User Generator | Home
Random user generator is a FREE API for generating placeholder user information. Get profile photos, names, and more. It's like Lorem Ipsum, for...
Read more >9 Random APIs & Free Alternatives List - December, 2022
Browse 9+ Random APIs available on RapidAPI.com. Top Random APIs include Random User, Bestquotes, Dad Jokes and more. Sign up today for free!...
Read more >Random (Java Platform SE 8 ) - Oracle Help Center
Creates a new random number generator using a single long seed. Method Summary. All Methods Instance Methods Concrete ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yep, sounds good. I’m happy to make the necessary changes to your PR before merging it in too.
OK. Turns out that test used plain numbers for
G
. I hope you don’t mind that I changed it to be an object with one keyarg
.I’m royally unsure about my changes in the rollup config.