bool PlayLingo(LingoGame lingo) { bool guessed = false; while (!guessed && !(pogingNummer > 5)) { lingo.playerWoord = ReadPlayerWord(LingoGame.LETTER_AANTAL); DisplayResults(lingo.playerWoord, lingo.EvaluateWord()); guessed = lingo.IsGuessed(); pogingNummer++; } return(guessed); }
void Start() { LingoGame lingo = new LingoGame(); string path = "../../woorden.txt"; lingo.lingoWoord = (ChooseWord(ReadWords(path))); if (PlayLingo(lingo)) { Console.WriteLine("U heeft gewonnen!"); } else { Console.WriteLine($"Jammer... Het woord was {lingo.lingoWoord}"); } Console.ReadKey(); }