public class WordGenerator
public static void Main(string[] args)
WordGenerator w = new WordGenerator();
Console.WriteLine(w.NewWord());
public string generatedWord;
private int maxWordLength;
private string[] dictionary = {
Random random = new Random();
int wordIndex = random.Next(dictionary.Length);
generatedWord = dictionary[wordIndex];
public bool CheckWord(string word)
return generatedWord.Equals(word);
public void SetDifficulty(int difficulty)
this.maxWordLength = difficulty;