1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
|
int main(int argc, char *argv[], int &Score)
{
char Str[12], again;
int choice;
system("color F2");
cout<<"Welcome To Computer Scrabble!"<<endl<<endl<<endl;
cout<<"Please Choose The Following Options:"<<endl;
cout<<"1.Play Scrabble."<<endl;
cout<<"2.Developers Picture."<<endl;
cout<<"3.Quit."<<endl<<endl<<endl;
cin>>choice;
cout<<endl<<endl;
if(choice==1)
{
cout<<"Please Re-arrange The Following Words: "<<endl<<endl<<endl;
FirstWord(Str, Score=0);
SecondWord(Str, Score);
ThirdWord(Str, Score);
FourthWord(Str, Score);
FifthWord(Str, Score);
SixthWord(Str, Score);
SeventhWord(Str, Score);
EightWord(Str, Score);
NinthWord(Str, Score);
TenthWord(Str, Score);
cout<<Score<<endl<<endl<<endl;
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
while(again=='y'||again=='Y')
{
cout<<"1.Play Scrabble."<<endl;
cout<<"2.Developers Picture."<<endl;
cout<<"3.Quit."<<endl<<endl<<endl;
cin>>choice;
cout<<endl<<endl;
if(choice==1)
{
cout<<"Please Re-arrange The Following Words: "<<endl<<endl<<endl;
FirstWord(Str, Score=0);
SecondWord(Str, Score);
ThirdWord(Str, Score);
FourthWord(Str, Score);
FifthWord(Str, Score);
SixthWord(Str, Score);
SeventhWord(Str, Score);
EightWord(Str, Score);
NinthWord(Str, Score);
TenthWord(Str, Score);
cout<<Score<<endl<<endl<<endl;
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
}
if(choice==2)
{
system("Team.jpg");
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
}
if(choice==3)
{
exit(0);
}
}
if(again=='n'||again=='N')
{
exit(0);
}
}
if(choice==2)
{
system("Team.jpg");
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
while(again=='y'||again=='Y')
{
cout<<"1.Play Scrabble."<<endl;
cout<<"2.Developers Picture."<<endl;
cout<<"3.Quit."<<endl<<endl<<endl;
cin>>choice;
cout<<endl<<endl;
if(choice==1)
{
cout<<"Please Re-arrange The Following Words: "<<endl<<endl<<endl;
FirstWord(Str, Score=0);
SecondWord(Str, Score);
ThirdWord(Str, Score);
FourthWord(Str, Score);
FifthWord(Str, Score);
SixthWord(Str, Score);
SeventhWord(Str, Score);
EightWord(Str, Score);
NinthWord(Str, Score);
TenthWord(Str, Score);
cout<<Score<<endl<<endl<<endl;
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
}
if(choice==2)
{
system("Team.jpg");
cout<<"Would You Like To Try The Program Again? (y/n): ";
cin>>again;
cout<<endl<<endl;
}
if(choice==3)
{
exit(0);
}
}
if(again=='n'||again=='N')
{
exit(0);
}
}
if(choice==3)
{
exit(0);
}
if(choice!=1&&choice!=2&&choice!=3)
{
cout<<"Please Enter Menu Numbers 1 to 3 Only!";
cout<<endl<<endl<<endl;
}
system("PAUSE");
return EXIT_SUCCESS;
}
|