The program I have constructed does not function in the way I want it to.Whenever I get for example to the North answer I go down into the answer choices and It just stops the program and ends it leaving choices out!! Some help with that would be appreciated ..And another question is how can I make this program more user appealing and friendly.... Oh and the program is a game,one of those old typing games.
#include <iostream>
usingnamespace std;
string i;
int main()
{
//Initial Welcome statement and Question
cout << "This is CAPS Sensitive so copy your answer the way you see it" << endl;
cout << "Hello world! Do you wish to continue with your adventure? YES or NO" << endl;
cin >> i;
//this is the yes continuing
if (i == "YES"){
cout << "Which Direction do you want to move? NORTH , SOUTH , EAST , or WEST" << endl;
cin >> i;
//Here start the options for the last question
//Start of north
if (i == "NORTH"){
cout << " You walk about 30 Miles North and start a campfire.. What will you fuel it with? GASOLINE or TIMBER " << endl;
cin >> i;
if (i == "GASOLINE"){
cout << " The fire explodes flames and catches yourself and your surroundings on fire, You die alive in the fire " << endl;
}
elseif (i == "TIMBER"){
cout << "The fire burns beautifully in the sky.... Do you wish to SLEEP or LOOK AT THE STARS" << endl;
cin >> i;
} elseif (i == "SLEEP"){
cout << " You sleep peacefully until a pack of wolves come and find you sleeping and eat you " << endl;
} elseif (i == "LOOK AT THE STARS"){
cout << "you look at the stars until it starts to rain....when you get up to go into the tent you get hit by lightning and die instantly" << endl;}
}
}
//start of south
if (i == "SOUTH"){
cout << " You fall in a ditch break a leg and can't crawl out.. Will you SUICIDE or CRAWL OUT?" << endl;
cin >> i;
if (i == "SUICIDE"){
cout << " You have ended your misery " << endl;
} elseif (i == "CRAWL OUT"){
cout << "A pack of wolves have tracked your scent and finding easy lunch they eat you " << endl;
}
}
//start of west
elseif (i == "WEST"){
cout << " You come face to face with a bear....do you wish to STRIKE or RUN?" << endl;
cin >> i;
if (i == "STRIKE"){
cout << " You don't hurt the bear in the slightest but with rage the bear rips you to shreds " << endl;
}
elseif (i == "RUN"){
cout << " You run for about 10 minutes before you trip and fall down a steep cliff while bash your head against the cliff side and die instantly " << endl;
}
}
//start of east
elseif (i == "EAST"){
cout << " You get lost in the wilderness and can't find your way back after about 5 hours of walking.... Do you wish to keep walking in the same DIRECTION or just GIVE UP " << endl;
cin >> i;
if (i == "DIRECTION"){
cout << " You eventually come upon an abandoned house and see a radio inside and call for help...You get airlifted to the nearest hospital and you live happily ever after " << endl;
cout << "if you liked it or got annoyed by the endless solutions feedback is welcome!!" << endl;
}
elseif (i == "GIVE UP"){
cout << " You died a lonely death " << endl;
}
}
//This is the NOT Wishing to continue the adventure
elseif (i == "NO"){
cout << "Oh, Well maybe you will play another day... How about that!" << endl;
}
return 0;
}