jump to navigation

Xanth thing! April 19, 2007

Posted by Matt in Uncategorized.
trackback

Heres some code for a website I’m helping…

#include <cstdlib>
#include <iostream>

using namespace std;

void init(int *list)
{
    for(int i=0;i<30;++i)
    list[i]=0;
}

int main(int argc, char *argv[])
{
    int characters[30];
    init(characters);
    bool looper=true;
    int step=0;
    char choice;
   
    while(looper)
    {
    switch(step)
    {
    case 0:
         cout<<”\nQuestion 1: <<Decentcy(puppy kicker style)>>\nYou see a wet, sorry-looking puppy in the middle of the path. Do you:\n\tA. Pick it up and give it a home\n\tB. Pick a blanket from a nearby tree\n\tC. Yell at it to make it run off the road\n\tD. Give it a good, swift kick\n\tE. Walk past it”;
         cout<<”\n”;
         cin>>choice;
         step=1;
         switch(choice)
         {
                       case ‘a’:
                       case ‘A’:
                                characters[0]+=5;
                                characters[5]+=5;
                                characters[6]+=5;
                                characters[12]+=5;
                                characters[16]+=5;
                                characters[20]+=5;
                                characters[22]+=5;
                                break;
                       case ‘b’:
                       case ‘B’:
                                characters[1]+=5;
                                characters[4]+=5;
                                characters[8]+=5;
                                characters[9]+=5;
                                characters[11]+=5;
                                characters[15]+=5;
                                characters[21]+=5;
                                break;
                       case ‘c’:
                       case ‘C’:
                                characters[3]+=5;
                                characters[7]+=5;
                                characters[19]+=5;
                                characters[24]+=5;
                                break;
                       case ‘d’:
                       case ‘D’:
                                characters[10]+=5;
                                characters[17]+=5;
                                characters[18]+=5;
                                break;
                       case ‘e’:
                       case ‘E’:
                                characters[2]+=5;
                                characters[13]+=5;
                                characters[14]+=5;
                                characters[23]+=5;
                                break;
                       default:
                               cout<<”Incorrect. Try again”<<endl;
                               characters[6]+=1;
                               characters[9]+=1;
                               break;
         }
         break;
    case 1:
         cout<<”\nQuestion 2:<<Intelligence>>\nA beuatiful ‘L’ studies you as you walk past. Do you:\nA. Not get the pun at all\nB. Do your best\nC. Avoid it at all costs\nD. Struggle to get by\nE. Pass with flying colors”<<endl;
         cout<<”\n”;
         cin>>choice;
         step=2;
         switch(choice)
         {
                       case ‘a’:
                       case ‘A’:
                                characters[9]+=5;
                                characters[10]+=5;
                                characters[12]+=5;
                                characters[13]+=5;
                                characters[18]+=5;
                                characters[19]+=5;
                                characters[20]+=5;
                                characters[23]+=5;
                                break;
                       case ‘b’:
                       case ‘B’:
                                characters[5]+=5;
                                characters[6]+=5;
                                characters[22]+=5;
                                break;
                       case ‘c’:
                       case ‘C’:
                                characters[0]+=5;
                                characters[4]+=5;
                                characters[8]+=5;
                                characters[16]+=5;
                                break;
                       case ‘d’:
                       case ‘D’:
                                characters[7]+=5;
                                characters[14]+=5;
                                characters[15]+=5;
                                characters[24]+=5;
                                break;
                       case ‘e’:
                       case ‘E’:
                                characters[1]+=5;
                                characters[2]+=5;
                                characters[3]+=5;
                                characters[11]+=5;
                                characters[17]+=5;
                                characters[21]+=5;
                                characters[25]+=5;
                                break;
                       default:
                               cout<<”Incorrect. Try again”<<endl;
                               characters[6]+=1;
                               characters[9]+=1;
                               break;
         }
break;
    case 2:
         cout<<”\nQuestion 3:<<Purttiness>>\nAn old man runs out and hits you with an ugly stick!  Do You:\nA. Scream with about 7 ‘E’s and cry for hours\nB. You hide your face and keep going \nC. Shrug and keep walking\nD. Thank Him\nE. The ugly stick breaks when it hits you\n”<<endl;
         cout<<”\n”;
         cin>>choice;
         step=0;
         looper=false;
         switch(choice)
         {
                       case ‘a’:
                       case ‘A’:
                                characters[0]+=5;
                                characters[6]+=5;
                                characters[10]+=5;
                                characters[12]+=5;
                                characters[14]+=5;
                                characters[15]+=5;
                                characters[16]+=5;
                                characters[20]+=5;
                                characters[23]+=5;
                                break;
                       case ‘b’:
                       case ‘B’:
                                characters[3]+=5;
                                characters[21]+=5;
                                characters[22]+=5;
                                break;
                       case ‘c’:
                       case ‘C’:
                                characters[1]+=5;
                                characters[2]+=5;
                                characters[4]+=5;
                                characters[5]+=5;
                                characters[7]+=5;
                                characters[8]+=5;
                                characters[11]+=5;
                                characters[19]+=5;
                                break;
                       case ‘d’:
                       case ‘D’:
                                characters[13]+=5;
                                characters[24]+=5;
                                break;
                       case ‘e’:
                       case ‘E’:
                                characters[9]+=5;
                                characters[17]+=5;
                                characters[18]+=5;
                                characters[25]+=5;
                                break;
                       default:
                               cout<<”Incorrect. Try again”<<endl;
                               characters[6]+=1;
                               characters[9]+=1;
                               break;
         }
break;
    }      
    }
    
   
int x=0;
for(int i=0;i<30;++i)
{
        if(characters[i]>characters[x])
        x=i;

}
cout<<”Character “<<x<<”: with “<<characters[x]<<”points!”<<endl;
    system(“PAUSE”);
    return EXIT_SUCCESS;
}
 Name  1 2 3 
 0 Princess Ivy A C A 
 1 Grey Mundane B E C 
 2 GM Humphery E E C 
 3 Queen Iris C E B 
 4 Prince Dor B C C 
 5 Dolph  A B C 
 6 Chameleon(Beauty) A B A 
 7 Crombie  C D C 
 8 Bink  B C C 
 9 Smash Ogre B A E 
10 D. Metria D A A 
11 Sherlock B E C 
12 Millie Ghost A A A 
13 Jumper Spider E A D 
14 Mare Imbri E D A 
15 Nada Nagda B D A 
16 Electra  A C A 
17 Sea Hag  D E E 
18 Fracto  D A E 
19 Gap Dragon C A C 
20 Irene  A A A
21 Trent  B E B 
22 Jenny Elf A B B 
23 Ida  E A A 
24 Grundy Golem C D D 
25 Chameleon(Ugly) C E E 

Question 1:<<Decentcy(puppy kicker style)>>
You see a wet, sorry-looking puppy in the middle of the path. Do you:
A. Pick it up and give it a home
B. Pick a blanket from a nearby tree
C. Yell at it to make it run off the road
D. Give it a good, swift kick
E. Walk past it

Question 2:<<Intelligence>>
A beuatiful ‘L’ studies you as you walk past. Do you:
A. Not get the pun at all
B. Do your best
C. Avoid it at all costs
D. Struggle to get by
E. Pass with flying colors

Question 3:<<Purttiness>>
An old man runs out and hits you with an ugly stick!  Do You:
A. Scream with about 7 ‘E’s and cry for hours
B. You hide your face and keep going
C. Shrug and keep walking
D. Thank Him
E. The ugly stick breaks when it hits you

Question 4:<<Greed>>
You come acriss a silver tree in the forest. Do You:
A. Take none of it
B. Take a leaf or two
C. Take a sizable brach
D. Take most of the tree
E. Take the whole thing

Advertisement

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.