
/* Generated by Interface Builder */

#import "How.h"
#import <appkit/Panel.h> /* Needed for Alertpanel */
#import <appkit/Form.h> /* For the Result Form in the Result panel */

@implementation How

int TOTAL = 0;

- init
{
   [super init];
   return self;
 }

- Chosen:sender
/* This is for the button is the Intro panel
 * once the user has chosen a number
 * he will click on this button
 */
{
    TOTAL =0;
    [CardOne orderFront:sender];
    return self;
}

- OneYes:sender
/* CardOne answer yes */
{
    [CardOne close];
    TOTAL=TOTAL + 1;
    [CardTwo orderFront:sender];
    return self;
}

- OneNo:sender
/* CardOne answer no */
{
    [CardOne close];
    [CardTwo orderFront:sender];
    return self;
}


- TwoYes:sender
/* CardTwo answer yes */
{
    [CardTwo close];
    TOTAL=TOTAL + 2;
    [CardThree orderFront:sender];
    return self;
}

- TwoNo:sender
/* CardTwo answer no */
{
    [CardTwo close];
    [CardThree orderFront:sender];
    return self;
}


- ThreeYes:sender
/* CardThree answer yes */
{
    [CardThree close];
    TOTAL=TOTAL + 4;
    [CardFour orderFront:sender];
    return self;
}

- ThreeNo:sender
/* CardOne answer no */
{
    [CardThree close];
    [CardFour orderFront:sender];
    return self;
}


- FourYes:sender
/* CardFour answer yes */
{
    [CardFour close];
    TOTAL=TOTAL + 8;
    [CardFive orderFront:sender];
    return self;
}

- FourNo:sender
/* CardFour answer no */
{
    [CardFour close];
    [CardFive orderFront:sender];
    return self;
}

- FiveYes:sender
/* CardFive answer yes */
{
    [CardFive close];
    TOTAL=TOTAL + 16;
    [CardSix orderFront:sender];
    return self;
}

- FiveNo:sender
/* CardFive answer no */
{
    [CardFive close];
    [CardSix orderFront:sender];
    return self;
}

- SixYes:sender
/* CardSix answer yes */
{
    [CardSix close];
    TOTAL=TOTAL + 32;
    [CardSeven orderFront:sender];
    return self;
}

- SixNo:sender
/* CardSix answer no */
{
    [CardSix close];
    [CardSeven orderFront:sender];
    return self;
}


- SevenYes:sender
/* CardSeven answer yes */
{
    [CardSeven close];
    TOTAL=TOTAL + 64;
    [ResultForm setIntValue:TOTAL];
    [ResultForm display];
    [Result orderFront:sender];
    return self;
}

- SevenNo:sender
/* CardSeven answer no */
{
    [CardSeven close];
    [ResultForm setIntValue:TOTAL];
    [ResultForm display];
    [Result orderFront:sender];
    return self;
}


- closeInfo:sender
/* This method closes the Info panel and opens and displays the MoreInfo panel */
{
      [Info performClose:sender]; /* This closes the Info panel */
      [MoreInfo orderFront:sender]; /* This displays the MoreInfo panel */
      return self; /* End of closeInfo method */
 }


@end
