示例#1
0
        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);
        }
示例#2
0
        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();
        }