Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string name = "";
- double chanceOfEnd = 0.0;
- string currentRule = keys[_randomGenerator.Next(0, keys.Count)];
- name += currentRule;
- while (_rules.ContainsKey(currentRule))
- {
- currentRule = _rules[currentRule][_randomGenerator.Next(0, _rules[currentRule].Count)];
- name += currentRule;
- if (_randomGenerator.NextDouble() < chanceOfEnd)
- break;
- else
- chanceOfEnd += 0.1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement