Here is the code:
#include <iostream>
using namespace std;
void intro()
{
cout << "Welcome to CASTLE" << endl;
cin.get();
cout << "A midevil RPG. Source is avaliable at thetrh51.blogspot.com along with documentation." << endl;
cout << "All the commands, descriptions are avaliable at thetrh51.blogspot.com";
cin.get();
}
int menu()
{
cout << "please visit thetrh51.blogspot.com for the source and info on the program including commands." << endl;
int dec;
cout << "1. save" << endl << "2. load" << endl << "3. contiue" << endl << "4. exit" << endl;
cout << "Please select from above: ";
cin >> dec;
}
void save()
{
}
char getinfo()
{
cout << "Please enter your characters name [max 12 characters]: ";
char playername[12];
cin >> playername;
cout << endl << "OK " << playername << " how old do you want to be? [20-90]: ";
int playerage;
cin >> playerage;
cout << endl << playername << " what is your difficulty going to be? [1-10]: ";
int difficulty;
cin >> difficulty;
cout << endl << "Here is what you entered" << endl;
cout << "Your name is " << playername << endl;
cout << "Your age is " << playerage << endl;
cout << "Your dificulty level is " << difficulty << endl;
}
int main()
{
int score;
licence();
intro();
getinfo();
char command[12];
cout << "command: ";
cin >> command;
if (command == "menu")
{
menu();
cin.get();
}
else if (command == "help")
{
cout << "visit thetrh51.blogspot.com for more info.";
cin.get();
}
else if (command == "exit")
{
return 1;
}
}
PS. If any one wants to help me with the save file it would be appreciated.
Attached File(s)
-
castle.txt (1.48K)
Number of downloads: 17

New Topic/Question
Reply



MultiQuote




|