#include <iostream>
#include <ctime>
#include <string>
#include <cstdlib>
usingnamespace std;
//Declare struct
struct Character{
string name;
int age;
string gender;
};
//Function prototypes
void intro();
void create(Character &);
void stage1(Character);
void ldoor();
void rdoor();
int main(){
string x;
Character hero;
create(hero);
getline(cin, x);
stage1(hero);
system("PAUSE");
return 0;
}
void create(Character &b)
{
string x;
cout << "Now that you ready to begin your journey lets create your hero!" << endl;
cout << "Please enter the name of your hero - " ;
getline(cin, b.name);
cout << endl;
cout << "Now how old is your hero? - ";
cin >> b.age;
cout << endl;
if(b.age<21){
cout << "Oh still a minor are we? Well no matter, your never to young to become a hero!" << endl;
}
else{
cout << endl;
cout << "Aren't you a bit to old to be a hero? hmmmm.....well no matter, lets go anyways!" << endl;
}
}
void stage1(Character hero)
{
int door;
string x;
cout << endl;
cout << "To continue hit enter" << endl;
getline(cin, x);
cout << "So " << hero.name << " should we take the left or right door?" << endl << endl;
cout << "!!!Remember all decisions may affect the games outcome!!!" << endl << endl;
cout << "Enter 1 to go through the right and 2 for the left." << endl;
cin >> door;
while(door != 1 || door !=2)
{
cout << "ummm please enter 1 or 2, try again." << endl;
cin >> door;
}
ldoor();
}
void ldoor()
{
cout << endl;
cout << "Look at the ceiling their is writing on the wall. " << endl;
cout << "What does it say?" << endl;
}