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); }
public bool EndGameEvents() { Narrative narrative = new Narrative(); EndGameNarative(narrative); return(PlayAgain(narrative)); }
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(); } }