hello, I have almost finished my text adventure creator but I need some help. It does not work perfectly. I was hoping somebody could run this program and give me some tips and tell me what is wrong.
//
// main.cpp
// Text creator 3
//
// Created by Olivier on 9/30/12.
// Copyright (c) 2012 Olivier. All rights reserved.
//
{
cout << "Text adventure creator by Olivier";
cout << " Version 2.0\n";
cout << "Name of game: ";
getline(cin,nameofgame);
cout << "Name of Author: ";
getline(cin,name);
cout << "Enter beginning of Text adventure: ";
getline(cin,start);
cout << "One answer to " << start;
cout << ": ";
getline(cin,startsolution1);
cout << "Another answer to " << start;
cout << ": ";
getline(cin,startsolution2);
cout << "Enter middle of the Text adventure if player types in " << startsolution1;
cout << ": ";
getline(cin,middle1);
cout << "Enter middle of Text adventure if player types " << startsolution2;
cout << ": ";
getline(cin,middle2);
cout << "One answer to " << middle1;
cout << ": ";
getline(cin,middle1solution1);
cout << "Another answer to " << middle1;
cout << ": ";
getline(cin,middle1solution2);
cout << "One answer to " << middle2;
cout << ": ";
getline(cin,middle2solution1);
cout << "Another answer to " << middle2;
cout << ": ";
getline(cin,middle2solution2);
cout << "Enter the end of the game if player types " << middle1solution1;
cout << ": ";
getline(cin,end1);
cout << "Enter the end of the game if player types " << middle1solution2;
cout << ": ";
getline(cin,end2);
cout << "Enter the end of the game if player types " << middle2solution1;
cout << ": ";
getline(cin,end3);
cout << "Enter the end of the game if player types " << middle2solution2;
cout << ": ";
getline(cin,end4);
gamestart();
}
void gamemiddle1()
{
cout << middle1;
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
getline(cin,middle1solution);
if (middle1solution == end1)
{
gameend1();
}
You have to type in the beginning of the text adventure and then you type two possible solutions to that and than type two middles of the text adventure for each solution and give 2 more solutions to that and then finally type in an end of the text adventure. Just run it and see.