hangry-river-horse icon indicating copy to clipboard operation
hangry-river-horse copied to clipboard

Reduce Random Username Repeats

Open wufire opened this issue 7 years ago • 1 comments

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.

wufire avatar Jun 23 '17 01:06 wufire

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.

randomPoison avatar Jun 23 '17 12:06 randomPoison