hangry-river-horse
hangry-river-horse copied to clipboard
Reduce Random Username Repeats
When usernames are generated, we currently use a naïve thread_rng().choose(NAMES)
to select a random name from a list. This too frequently results in repeated usernames appearing on screen.
We should replace the naïve random selection with an inexpensive random selector which guarantees no repeats until necessary (or at least, makes it less likely).
This issue may also become significantly less noticeable when #2 is implemented.
This could be implemented by throwing all the names into a Vec<String>
, shuffling the list, and then popping the last one off each time we need to generate a name. We would then refill the list once it is empty.