From 30f7530288b5eddcb191df29bdc3b162342b5310 Mon Sep 17 00:00:00 2001 From: Luke Gebbink <48702026+PersonGuyGit@users.noreply.github.com> Date: Thu, 16 Jul 2020 16:41:08 -0600 Subject: [PATCH] Add files via upload This was an idea I had for Phase 2. We probs should use a list or some other data structure, but this was just a test --- DialogTestForERPG.cpp | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 DialogTestForERPG.cpp diff --git a/DialogTestForERPG.cpp b/DialogTestForERPG.cpp new file mode 100644 index 0000000..9bb31ff --- /dev/null +++ b/DialogTestForERPG.cpp @@ -0,0 +1,55 @@ +// DialogTestForERPG.cpp : This file contains the 'main' function. Program execution begins and ends there. +// + +#include +#include + +int main() +{ + int num = 0; + + std::string SentanceFirst{"Welcome to a world ravaged by "}; + std::string SentanceSecond{ "You step out of the " }; + std::string SentanceThird{ ", to a new place unlike any other." }; + + std::string firstWords[] = { "A Greedy King", "Heavy Taxation", "A galaxy wide fuel crisis" }; + std::string secondWords[] = { "Horse and Buggy", "Car", "Landspeeder" }; + + std::cout << "Hello, Welcome to our game\nWhich setting do you want to play in?\n1: Fantasy\n2: Modern Day\n3: Sci-Fi\n" << std::endl; + + std::cin >> num; + + while (num > 3 || num < 0) + { + std::cout << "Please enter a valid number" << std::endl; + } + + if (num == 1) + { + std::cout << SentanceFirst + firstWords[0] + ".\n" + SentanceSecond + secondWords[0] + SentanceThird; + } + + if (num == 2) + { + std::cout << SentanceFirst + firstWords[1] + ".\n" + SentanceSecond + secondWords[1] + SentanceThird; + } + + if (num == 3) + { + std::cout << SentanceFirst + firstWords[2] + ".\n" + SentanceSecond + secondWords[2] + SentanceThird; + } + + std::cin >> num; + +} + +// Run program: Ctrl + F5 or Debug > Start Without Debugging menu +// Debug program: F5 or Debug > Start Debugging menu + +// Tips for Getting Started: +// 1. Use the Solution Explorer window to add/manage files +// 2. Use the Team Explorer window to connect to source control +// 3. Use the Output window to see build output and other messages +// 4. Use the Error List window to view errors +// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project +// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file