From b5a12c3489beb3c7954b48c3f0d46322c5e60401 Mon Sep 17 00:00:00 2001 From: "Ryan Gillett (gillettr)" Date: Mon, 25 Feb 2019 02:49:11 +0000 Subject: [PATCH] Update and rename Game Start to Game Start - working base --- Game Start => Game Start - working base | 76 ++++++++++++------------- 1 file changed, 37 insertions(+), 39 deletions(-) rename Game Start => Game Start - working base (50%) diff --git a/Game Start b/Game Start - working base similarity index 50% rename from Game Start rename to Game Start - working base index 0152e6c..45338f8 100644 --- a/Game Start +++ b/Game Start - working base @@ -14,7 +14,7 @@ int main() std::cout << "You better move fast, " << name << ". The goblins are attacking the city and the people need your help." << std::endl; system("PAUSE"); int _getch(); - + } system("cls"); int choiceOne_Path; @@ -41,7 +41,7 @@ retry: std::cout << "Chief: There isn't anytime, follow me" << std::endl; std::cout << "# The chief leads you away from the chaos deep into the forest" << std::endl; system("PAUSE"); - return 0; + } else @@ -56,42 +56,40 @@ retry: system("cls"); switch (choiceOne_Path) { - - case 1: std::cout << "" << std::endl; - - case 2: std::cout << "\n!!!----------------------Chapter Two: Surviving after the Attack----------------------!!!" << std::endl; - std::cout << "Chief: We need to build a tent to stay the night and collect some food..hmm..fruits is a good idea" << std::endl; - std::cout << "\nYou: Which one you want me to do?" << std::endl; - std::cout << "Chief: Choose, do what you prefer, I'll do the other one" << std::endl; - - int choiceTwo2_Path; - std::cout << "#Which task are you going to do?" << std::endl; - std::cout << "\t >> Enter '1' to collect food" << std::endl; - std::cout << "\t >> Enter '2' to make a tent" << std::endl; - retry1: - std::cout << "\nEnter your choice "; - std::cin >> choiceTwo2_Path; - if (choiceOne_Path == 1) - { - std::cout << "You:I will take some food" << std::endl; - std::cout << "\nChief:That's fine, I'll make the tent" << std::endl; - system("PAUSE"); - return 0; - } - else if (choiceTwo2_Path == 2) - { - std::cout << "You:I'll do the tent, I believe I'm better doing it rather than pick up food" << std::endl; - std::cout << "\nChief:That's fine, see you in a couple of minutes then" << std::endl; - system("PAUSE"); - return 0; - } - else - { - std::cout << "You're doing it wrong hero! Press either '1' or '2', that's all!" << std::endl; - goto retry1; - } - } -} + case 1: std::cout << "" << std::endl; -//link to the website i was using as a basis https://levelskip.com/classic/Make-a-Text-Based-Game + + case 2: int choiceTwo2_Path; + std::cout << "\n!!!----------------------Chapter Two: Surviving after the Attack----------------------!!!" << std::endl; + std::cout << "Chief: We need to build a tent to stay the night and collect some food..hmm..fruits is a good idea" << std::endl; + std::cout << "\nYou: Which one you want me to do?" << std::endl; + std::cout << "Chief: Choose, do what you prefer, I'll do the other one" << std::endl; + std::cout << "#Which task are you going to do?" << std::endl; + std::cout << "\t >> Enter '1' to collect food" << std::endl; + std::cout << "\t >> Enter '2' to make a tent" << std::endl; + + retry1: + std::cout << "\nEnter your choice "; + std::cin >> choiceTwo2_Path; + if (choiceTwo2_Path == 1) + { + std::cout << "You:I will take some food" << std::endl; + std::cout << "\nChief:That's fine, I'll make the tent" << std::endl; + system("PAUSE"); + return 0; + } + else if (choiceTwo2_Path == 2) + { + std::cout << "You:I'll do the tent, I believe I'm better doing it rather than pick up food" << std::endl; + std::cout << "\nChief:That's fine, see you in a couple of minutes then" << std::endl; + system("PAUSE"); + return 0; + } + else + { + std::cout << "You're doing it wrong hero! Press either '1' or '2', that's all!" << std::endl; + goto retry1; + } + } +}