You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We shouldn't use bare rng functions inside the project but instead an object that contains the meta data so we can reconstruct the function if needed.
Basically right now we accept a rng (like Math.random, or something more reproducable for prod, or something fixed for tests) which is just a function. But once we have it we can't really trace back how it was created. This makes it harder to generate the code to reproduce a particular test case.
We shouldn't use bare rng functions inside the project but instead an object that contains the meta data so we can reconstruct the function if needed.
Basically right now we accept a rng (like
Math.random
, or something more reproducable for prod, or something fixed for tests) which is just a function. But once we have it we can't really trace back how it was created. This makes it harder to generate the code to reproduce a particular test case.Something like this would solve it:
Then we can figure out what created the function through
_class
, recreate it through the_params
property, and just call it throughrng.roll()
.The text was updated successfully, but these errors were encountered: