/* Interactive Fiction Project Jennifer A. Nagy 10/16/02 */ //list of included filew #include #include #include #include #include #include #include //list of global variables char direction; char input[20]; int create[10]={1,1,1,1,1,1,1,1,1,1}; int i=2; int j=2; int map[5][5]={ {2,2,2,2,2}, {2,1,1,1,2}, {2,1,1,1,2}, {2,1,1,1,2}, {2,2,2,2,2}}; //function declaration int menu(); void move(char direction); void go(); void inv(); void start(); void nw(); void n(); void ne(); void w(); void e(); void sw(); void s(); void se(); void tree(); void make(); //Main function which begins the program. Has basic output and calls //menu() and start(). void main() { cout<<" ********************************\n" <<" * *\n" <<" * Junkyard Wars *\n" <<" * by *\n" <<" * Jennifer A. Nagy *\n" <<" * *\n" <<" ********************************\n\n" <<""<>option; if (option!='p' && option!='P' && option!='i' && option!='I' && option!='r' && option!='R' && option!='q' && option!='Q') {cout<<"\nCommand not recognized. Please try again.\n\n"; } if (option=='p' || option=='P') { return 0; } if (option=='i' || option=='I') { system("cls"); cout<<" Welcome to Junkyard Wars! It is your job to construct an extraordinary\n" <<"machine and pit it against your opponents machine in a challenge to be\n" <<"the best.\n" <<" Your job is to find the best pieces of junk to build your machine and\n" <<"put those pieces together before time runs out. Then you must beat the\n" <<"challenge set up for you to test your machine. This is the engineering\n" <<"equivalent of the Superbowl!\n" <<" Get ready for excitement and fun playing Junkyard Wars!\n" <<"\nPress enter to return to the menu." <<""<