I've put Math.random in a variable, made Tracery use that instead of direct calls to Math.random, then added a function setRng to set that variable with a different function.
I've used this in the tests to be sure it worked, but you might not want that. Up to you: it's a tricky question.
As briefly discussed on Twitter.
I've put Math.random in a variable, made Tracery use that instead of direct calls to Math.random, then added a function setRng to set that variable with a different function.
I've used this in the tests to be sure it worked, but you might not want that. Up to you: it's a tricky question.
I've documented the function in the readme file.