Пример #1
0
        bool PlayAgain(Narrative narrative)
        {
            bool canNotContinue = true;

            while (canNotContinue)
            {
                narrative.PlayAgainQuestion();
                var input = Console.ReadKey().Key;
                if (input == ConsoleKey.Y)
                {
                    canNotContinue = false;
                    ResetGame();
                    MainMenu.replayGame = true;
                    //replay
                    return(true);
                }
                else if (input == ConsoleKey.X)
                {
                    canNotContinue = false;
                    //finish game
                    return(false);
                }
            }
            return(true);
        }
Пример #2
0
        public bool EndGameEvents()
        {
            Narrative narrative = new Narrative();

            EndGameNarative(narrative);
            return(PlayAgain(narrative));
        }
Пример #3
0
 void EndGameNarative(Narrative narrative)
 {
     if (PlayerStats.health <= 0)
     {
         //you dead son
         Console.Clear();
         narrative.Death();
     }
     else if (PlayerStats.armor >= 100)
     {
         //you win bro
         Console.Clear();
         narrative.Win();
     }
 }