Skip to content

Commit

Permalink
Fix: fixed random sentence generator length
Browse files Browse the repository at this point in the history
  • Loading branch information
VikashChauhan51 committed Jul 11, 2023
1 parent a644c57 commit 4e268b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/RandomGenerator/RandomSentenceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ public string Generate(int wordsCount)
string.Concat(input[0].ToString().ToUpper(), input.AsSpan(1)) :
partOfSpeechs[operation]());

}
else
{
//add random word
words.Add(partOfSpeechs[partOfSpeechsTypes.Last()]());

}

count++;
Expand Down

0 comments on commit 4e268b8

Please sign in to comment.