master
Jordan Orelli 11 years ago
parent 4925a1f0d4
commit a7912f388b

@ -67,6 +67,9 @@ func (w wordBag) lengths() []int {
func (w wordBag) randomWordN(n int) string {
words, ok := w[n]
if ok {
if len(words) == 1 {
return words[0]
}
return words[rand.Intn(len(words)-1)]
}
return ""

Loading…
Cancel
Save