Seed doesn't work when generating multiple values
Closed this issue · 0 comments
maxpilotto commented
val gen = StringGenerator(1234)
repeat(5) {
println(gen.one())
}
// Output:
// Nv8S&
// Nv8S&
// Nv8S&
// Nv8S&
// Nv8S&
The issue is due to the fact that the AbstractGenerator will instantiate Chance each time a value is generated, therefore the seed is always the same