0
How to keep a word until conditions are met? Suggestions? It's in code playground if you need a better idea what I'm asking.
static string GetWord() { int[] num = new int[3]{0, 1, 2}; Random random = new Random(); int getWord = num[random.Next(num.Length)]; string[] wordList = new string[]{ "bitch", "arson", "trope" }; return wordList[getWord]; } static void Main(string[] args) { SO! When this gets called in main it will create a new word every time. I want it to keep the word until the user guesses it. How?
1 Odpowiedź
0
you should put in wich you guess the Word inside of a do-while-loop and copare the Input-string to the word