Advertisement
Guest User

AlanSmithee

a guest
Feb 8th, 2010
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 46.33 KB | None | 0 0
  1. /*
  2.  
  3. FINALLLLLLLLLLLLYYYYYY!!! *.*
  4.  
  5. Okay, good to know stuff:
  6.  
  7. FIRST LETTER OF EACH VARIABLE:
  8.  
  9. small i = integer.
  10. small c = character.
  11. small f = float.
  12. small p = pointer.
  13.  
  14. ex. piOnes = pointer to int Ones
  15.  
  16. I havn't comment so much, but it's more of a long code then an advanced one, so shouldn't be to hard :P
  17.  
  18. also, IM USING CODE::BLOCKS, IF YOU USE ANOTHER COMPILER YOU MIGHT HAVE TO #include "stdafx.h"
  19.  
  20. :P
  21.  
  22. */
  23.  
  24. #include <iostream>
  25. #include <ctime>
  26.  
  27. // Dice-generator function
  28. void RollDice(int * a, int * b, int * c, int * d, int * e, int * f, int * g, int * h, int * i, int * j, int * k, int * l, int * m, int * n, int * o, float * a, float * b, float * c, float * d, float * e, float * f, float * g, float * h, float * i, float * j, float * k, float * l, float * m, float * n, float * o);
  29. // Scoreboard function, input dice
  30. void Scoreboard(int x1, int x2, int x3, int x4, int x5, int * a, int * b, int * c, int * d, int * e, int * f, int * g, int * h, int * i, int * j, int * k, int * l, int * m, int * n, int * o, float * a, float * b, float * c, float * d, float * e, float * f, float * g, float * h, float * i, float * j, float * k, float * l, float * m, float * n, float * o);
  31. // Rules function, made it a function to keep main-function as clean as possible
  32. void Rules();
  33.  
  34. using namespace std;
  35. using std::cout;
  36. using std::cin;
  37. using std::rand;
  38. using std::srand;
  39.  
  40.  
  41. // Main function serves as a menu to hop between the other functions
  42. int main()
  43. {
  44.     // Variables that we will use to save the results
  45.     // Pointers for passing through scope and changing value
  46.     int iOnes = 0;                  int * piOnes = &iOnes;
  47.     int iTwos = 0;                  int * piTwos = &iTwos;
  48.     int iThrees = 0;                int * piThrees = &iThrees;
  49.     int iFours = 0;                 int * piFours = &iFours;
  50.     int iFives = 0;                 int * piFives = &iFives;
  51.     int iSixes = 0;                 int * piSixes = &iSixes;
  52.     int iPair = 0;                  int * piPair = &iPair;
  53.     int iTwoPair = 0;               int * piTwoPair = &iTwoPair;
  54.     int iThreeOfaKind = 0;          int * piThreeOfaKind = &iThreeOfaKind;
  55.     int iFourOfaKind = 0;           int * piFourOfaKind = &iFourOfaKind;
  56.     int iSmallStraight = 0;         int * piSmallStraight = &iSmallStraight;
  57.     int iLargeStraight = 0;         int * piLargeStraight = &iLargeStraight;
  58.     int iFullhouse = 0;             int * piFullhouse = &iFullhouse;
  59.     int iChance = 0;                int * piChance = &iChance;
  60.     int iYahtzee = 0;               int * piYahtzee = &iYahtzee;
  61.  
  62.     // Variables that we will use to check if the user have saved anything from before (even if it's a 0)
  63.     // Pointers for passing through scope and changing value
  64.     float fOnes = 0.5;              float * pfOnes = &fOnes;
  65.     float fTwos = 0.5;              float * pfTwos = &fTwos;
  66.     float fThrees = 0.5;            float * pfThrees = & fThrees;
  67.     float fFours = 0.5;             float * pfFours = &fFours;
  68.     float fFives = 0.5;             float * pfFives = &fFives;
  69.     float fSixes = 0.5;             float * pfSixes = &fSixes;
  70.     float fPair = 0.5;              float * pfPair = &fPair;
  71.     float fTwoPair = 0.5;           float * pfTwoPair = &fTwoPair;
  72.     float fThreeOfaKind = 0.5;      float * pfThreeOfaKind = &fThreeOfaKind;
  73.     float fFourOfaKind = 0.5;       float * pfFourOfaKind = &fFourOfaKind;
  74.     float fSmallStraight = 0.5;     float * pfSmallStraight = &fSmallStraight;
  75.     float fLargeStraight = 0.5;     float * pfLargeStraight = &fLargeStraight;
  76.     float fFullhouse = 0.5;         float * pfFullhouse = &fFullhouse;
  77.     float fChance = 0.5;            float * pfChance = & fChance;
  78.     float fYahtzee = 0.5;           float * pfYahtzee = &fYahtzee;
  79.  
  80.  
  81.  
  82.     int iX = 0;
  83.     int * piX = &iX;
  84.  
  85.     // Variable for menu-loop
  86.     int iMenuChoice = 0;
  87.  
  88.     do{
  89.  
  90.  
  91.  
  92.         system("CLS");
  93.  
  94.         cout << "   ''''  /''/   /'''   |'''''''''''''| |'''''''| |'''''''| |'''''''|  |''|" << endl;
  95.         cout << "    '  '/  /   /    '  |____     ____| |___   /  |  |      |  |       |  |" << endl;
  96.         cout << "     '    /   /  /'  '      |   |         /  /   |  ''''|  |  ''''|   |  |" << endl;
  97.         cout << "      |  |   /  /__'  '     |   |        /  /    |  |      |  |       ''''" << endl;
  98.         cout << "      |  |  /  ______  '    |   |       /  ''''| |   '''''||   '''''| |''|" << endl;
  99.         cout << "      |__| /__/      '__'   |___|      |_______| |________||________| |__|" << endl;
  100.  
  101.         cout << endl << endl << endl;
  102.  
  103.         cout << "Menu:" << endl << endl;
  104.         cout << "1. Roll dice" << endl;
  105.         cout << "2. Check Scoreboard" << endl;
  106.         cout << "3. Rules" << endl;
  107.         cout << "4. Exit" << endl;
  108.  
  109.         cin >> iMenuChoice;
  110.  
  111.         if(iMenuChoice == 1)
  112.         {
  113.             RollDice(piOnes, piTwos, piThrees, piFours, piFives, piSixes, piPair, piTwoPair, piThreeOfaKind, piFourOfaKind, piSmallStraight, piLargeStraight, piFullhouse, piChance, piYahtzee, pfOnes, pfTwos, pfThrees, pfFours, pfFives, pfSixes, pfPair, pfTwoPair, pfThreeOfaKind, pfFourOfaKind, pfSmallStraight, pfLargeStraight, pfFullhouse, pfChance, pfYahtzee);
  114.             ++*piX; // counter inside Menuchoice -> roll dice, so it doesnt go up by lookin at the rules etc.
  115.         }
  116.         else if(iMenuChoice == 2)
  117.         {
  118.             cout << endl << "1  Ones:           (" << *piOnes << ")";
  119.                 if (*pfOnes != 0.5)  cout << " saved";
  120.             cout << endl << "2  Twos:           (" << *piTwos << ")";
  121.                 if (*pfTwos != 0.5)  cout << " saved";
  122.             cout << endl << "3  Threes:         (" << *piThrees << ")";
  123.                 if (*pfThrees != 0.5)  cout << " saved";
  124.             cout << endl << "4  Fours:          (" << *piFours << ")";
  125.                 if (*pfFours != 0.5)  cout << " saved";
  126.             cout << endl << "5  Fives:          (" << *piFives << ")";
  127.                 if (*pfFives != 0.5)  cout << " saved";
  128.             cout << endl << "6  Sixes:          (" << *piSixes << ")";
  129.                 if (*pfSixes != 0.5)  cout << " saved";
  130.             cout << endl << "7  Pair:           (" << *piPair << ")";
  131.                 if (*pfPair != 0.5)  cout << " saved";
  132.             cout << endl << "8  TwoPair:        (" << *piTwoPair << ")";
  133.                 if (*pfTwoPair != 0.5)  cout << " saved";
  134.             cout << endl << "9  Three of a Kind:(" << *piThreeOfaKind << ")";
  135.                 if (*pfThreeOfaKind != 0.5)  cout << " saved";
  136.             cout << endl << "10 Four of a Kind: (" << *piFourOfaKind << ")";
  137.                 if (*pfFourOfaKind != 0.5)  cout << " saved";
  138.             cout << endl << "11 Small Straight: (" << *piSmallStraight << ")";
  139.                 if (*pfSmallStraight != 0.5)  cout << " saved";
  140.             cout << endl << "12 Large Straight: (" << *piLargeStraight << ")";
  141.                 if (*pfLargeStraight != 0.5)  cout << " saved";
  142.             cout << endl << "13 Full House:     (" << *piFullhouse << ")";
  143.                 if (*pfFullhouse != 0.5)  cout << " saved";
  144.             cout << endl << "14 Chance:         (" << *piChance << ")";
  145.                 if (*pfChance != 0.5)  cout << " saved";
  146.             cout << endl << "15 Yahtzee:        (" << *piYahtzee << ")";
  147.                 if (*pfYahtzee != 0.5)  cout << " saved";
  148.             cout << endl << endl << "Total:             (" << *piOnes + *piTwos + *piThrees + *piFours + *piFives + *piSixes + *piPair + *piTwoPair + *piThreeOfaKind + *piFourOfaKind + *piSmallStraight + *piLargeStraight + *piFullhouse + *piChance +*piYahtzee << ")" << endl << endl;
  149.  
  150.             system("PAUSE");
  151.  
  152.         }
  153.         else if(iMenuChoice == 3)
  154.         {
  155.             Rules();
  156.         }
  157.         else if(iMenuChoice == 4){}
  158.         {
  159.             cout << endl << "BYE BYE!" << endl << endl;
  160.         }
  161.  
  162.  
  163.  
  164.         if(*piX == 15)
  165.         {
  166.             system("CLS");
  167.             cout << "your total score is: " << *pfOnes+*pfTwos+*pfThrees+*pfFours+*pfFives+*pfSixes+*pfPair+*pfTwoPair+*pfThreeOfaKind+*pfFourOfaKind+*pfSmallStraight+*pfLargeStraight+*pfFullhouse+*pfChance+*pfYahtzee << endl;
  168.             cout << endl << "Bye bye.." << endl << endl;
  169.             system("PAUSE");
  170.  
  171.             iMenuChoice = 4;
  172.         }
  173.  
  174.  
  175.  
  176.  
  177.     }while(iMenuChoice != 4);
  178.  
  179.  
  180.  
  181.     return 0;
  182. }
  183.  
  184.  
  185.  
  186.  
  187. void RollDice(int * piOnes, int * piTwos, int * piThrees, int * piFours, int * piFives, int * piSixes, int * piPair, int * piTwoPair, int * piThreeOfaKind, int * piFourOfaKind, int * piSmallStraight, int * piLargeStraight, int * piFullhouse, int * piChance, int * piYahtzee, float * pfOnes, float * pfTwos, float * pfThrees, float * pfFours, float * pfFives, float * pfSixes, float * pfPair, float * pfTwoPair, float * pfThreeOfaKind, float * pfFourOfaKind, float * pfSmallStraight, float * pfLargeStraight, float * pfFullhouse, float * pfChance, float * pfYahtzee)
  188. {
  189.     srand(time(NULL));
  190.  
  191.     /* Varibles */
  192.     int x = 0;                                      // For the do-while loop that simulates the three casts.
  193.     int tarning[5];                                 // The dices.
  194.     int save[5];                                    // saving-slots for the dices.
  195.     save[0] = 0, save[1] = 0, save[2] = 0, save[3] = 0, save[4] = 0;
  196.     char cYesNo;                                    // For saving option.
  197.     int number;
  198.  
  199.     /* Dice Loop, 5 * 3 casts */
  200.     do{
  201.         x++;                                        // Max three casts (will check this at end of do-while loop)
  202.  
  203.         system("CLS");
  204.  
  205.         cout << save[0] << ", " << save[1] << ", " << save[2] << ", " << save[3] << ", " << save[4] << endl << endl;
  206.  
  207.         cout << "Rolling..." << endl << endl;
  208.  
  209.         for(int x = 0; x < 5; x++)                  // cast the 5 dices
  210.         {
  211.             if(tarning[x] != save[x])
  212.             {
  213.                 tarning[x] = rand() % 6 + 1;            // random generator inside the forloop and if-statement!
  214.                 cout << tarning[x] << endl;
  215.             }
  216.         }
  217.  
  218.         for(int x = 0; x < 5; x++)                  // Loop for saving the dices in its own slot
  219.         {
  220.             if(save[x] != tarning[x])
  221.             {
  222.  
  223.             cout << "\n" << "Save dice " << x + 1 << "? y / n" << endl;
  224.             cin >> cYesNo;
  225.  
  226.                 if(cYesNo == 'y' || cYesNo == 'Y')
  227.                 {
  228.                     save[x] = tarning[x];
  229.                 }
  230.             }
  231.         }
  232.  
  233.         cout << endl << endl;
  234.  
  235.  
  236.     /* Checks to see so that you cast max 3 times (or less if you saved all dices) */
  237.     }while(x < 2 || (tarning[0] != save[0] && tarning[1] != save[1] && tarning[2] != save[2] && tarning[3] != save[3] && tarning[4] != save[4]));
  238.  
  239.  
  240.     // This is the third and last cast of the dices, and here all the remaining dices will be saved automaticly, so there won be any zeros!
  241.  
  242.     if(tarning[0] != save[0] || tarning[1] != save[1] || tarning[2] != save[2] || tarning[3] != save[3] || tarning[4] != save[4])
  243.     {
  244.     system("CLS");
  245.  
  246.     cout << save[0] << ", " << save[1] << ", " << save[2] << ", " << save[3] << ", " << save[4] << endl << endl;
  247.     cout << "This is your last roll!" << endl;
  248.     cout << "Remaining dices will be saved automaticly!" << endl << endl;;
  249.  
  250.     cout << "Rolling..." << endl << endl;
  251.  
  252.     for(int x = 0; x < 5; x++)                  // cast the 5 dices
  253.     {
  254.         if(tarning[x] != save[x])
  255.         {
  256.             tarning[x] = rand() % 6 + 1;        // random generator inside the forloop and if-statement!
  257.             cout << tarning[x] << endl;
  258.         }
  259.     }
  260.  
  261.     cout << endl << endl;
  262.     system("PAUSE");
  263.  
  264.     for(int x = 0; x < 5; x++)                  // Loop for saving the dices in its own slot
  265.     {
  266.         if(save[x] != tarning[x])
  267.         {
  268.                 save[x] = tarning[x];
  269.         }
  270.     }
  271.  
  272.     cout << endl << endl;
  273.  
  274.     }
  275.  
  276.     /* re-save the dice in normal int's, instead of the array, cous i don't know how to send a array to another function :P */
  277.     int x1, x2, x3, x4, x5;
  278.     x1 = save[0];
  279.     x2 = save[1];
  280.     x3 = save[2];
  281.     x4 = save[3];
  282.     x5 = save[4];
  283.  
  284.     /* sends the results to the scoreboard */
  285.     Scoreboard(x1, x2, x3, x4, x5, piOnes, piTwos, piThrees, piFours, piFives, piSixes, piPair, piTwoPair, piThreeOfaKind, piFourOfaKind, piSmallStraight, piLargeStraight, piFullhouse, piChance, piYahtzee, pfOnes, pfTwos, pfThrees, pfFours, pfFives, pfSixes, pfPair, pfTwoPair, pfThreeOfaKind, pfFourOfaKind, pfSmallStraight, pfLargeStraight, pfFullhouse, pfChance, pfYahtzee);
  286.  
  287.  
  288.     return;
  289. }
  290.  
  291.  
  292. /*
  293. THIS NEXT FUNCTION TAKES CARE OF SAVING THE RESULTS, IT ALSO CHECKS TO
  294. SEE IF THE DICES MEET THE RQUIREMENTS TO SAVE IN A SPESIFIC SLOT!
  295.  
  296. OBS! THERE IS ALOT OF IF STATEMENTS FOR CHECKING IF THE DICES MEET THE
  297. REQUIREMENT BUT THEY ARE DEVIDED IN TO SECTIONS FOR EASIER USAGE.
  298. I HAVE ALSO AVOIDED COMMENTING INSIDE THE FUNCTION!
  299. */
  300.  
  301. void Scoreboard(int x1,int x2,int x3,int x4,int x5, int * piOnes, int * piTwos, int * piThrees, int * piFours, int * piFives, int * piSixes, int * piPair, int * piTwoPair, int * piThreeOfaKind, int * piFourOfaKind, int * piSmallStraight, int * piLargeStraight, int * piFullhouse, int * piChance, int * piYahtzee, float * pfOnes, float * pfTwos, float * pfThrees, float * pfFours, float * pfFives, float * pfSixes, float * pfPair, float * pfTwoPair, float * pfThreeOfaKind, float * pfFourOfaKind, float * pfSmallStraight, float * pfLargeStraight, float * pfFullhouse, float * pfChance, float * pfYahtzee)
  302. {
  303.     /* Variables from Roll-function are passed in. */
  304.  
  305.  
  306.  
  307.     //Other Variables, for saving option etc
  308.     int iSave = 0;
  309.     char cProceed;
  310.  
  311.     //Start of loop that will continue untill the user has entered something, and then return to main function
  312.     for(; ;)
  313.     {
  314.         system("CLS");
  315.  
  316.         cout << x1 << ", " << x2 << ", " << x3 << ", " << x4 << ", " << x5 << endl << endl;
  317.  
  318.  
  319.         cout << "What do you want to save your result as?" << endl;
  320.         cout << "(enter the number and press enter)" << endl << endl;
  321.  
  322.  
  323.         cout << "1  Ones:           (" << *piOnes << ")";
  324.             if (*pfOnes != 0.5)  cout << " saved";
  325.         cout << endl << "2  Twos:           (" << *piTwos << ")";
  326.             if (*pfTwos != 0.5)  cout << " saved";
  327.         cout << endl << "3  Threes:         (" << *piThrees << ")";
  328.             if (*pfThrees != 0.5)  cout << " saved";
  329.         cout << endl << "4  Fours:          (" << *piFours << ")";
  330.             if (*pfFours != 0.5)  cout << " saved";
  331.         cout << endl << "5  Fives:          (" << *piFives << ")";
  332.             if (*pfFives != 0.5)  cout << " saved";
  333.         cout << endl << "6  Sixes:          (" << *piSixes << ")";
  334.             if (*pfSixes != 0.5)  cout << " saved";
  335.         cout << endl << "7  Pair:           (" << *piPair << ")";
  336.             if (*pfPair != 0.5)  cout << " saved";
  337.         cout << endl << "8  TwoPair:        (" << *piTwoPair << ")";
  338.             if (*pfTwoPair != 0.5)  cout << " saved";
  339.         cout << endl << "9  Three of a Kind:(" << *piThreeOfaKind << ")";
  340.             if (*pfThreeOfaKind != 0.5)  cout << " saved";
  341.         cout << endl << "10 Four of a Kind: (" << *piFourOfaKind << ")";
  342.             if (*pfFourOfaKind != 0.5)  cout << " saved";
  343.         cout << endl << "11 Small Straight: (" << *piSmallStraight << ")";
  344.             if (*pfSmallStraight != 0.5)  cout << " saved";
  345.         cout << endl << "12 Large Straight: (" << *piLargeStraight << ")";
  346.             if (*pfLargeStraight != 0.5)  cout << " saved";
  347.         cout << endl << "13 Full House:     (" << *piFullhouse << ")";
  348.             if (*pfFullhouse != 0.5)  cout << " saved";
  349.         cout << endl << "14 Chance:         (" << *piChance << ")";
  350.             if (*pfChance != 0.5)  cout << " saved";
  351.         cout << endl << "15 Yahtzee:        (" << *piYahtzee << ")";
  352.             if (*pfYahtzee != 0.5)  cout << " saved";
  353.         cout << endl << endl << "Total:             (" << *piOnes + *piTwos + *piThrees + *piFours + *piFives + *piSixes + *piPair + *piTwoPair + *piThreeOfaKind + *piFourOfaKind + *piSmallStraight + *piLargeStraight + *piFullhouse + *piChance +*piYahtzee << ")" << endl << endl;
  354.  
  355.         cin >> iSave;
  356.  
  357. /***********************************************************************************************************************/
  358. /*ONES******************************************************************************************************************/
  359.         if(iSave == 1)
  360.         {
  361.             if(*pfOnes == 0.5)
  362.             {
  363.                 if(x1 == 1) {*piOnes += x1;}
  364.                 if(x2 == 1) {*piOnes += x2;}
  365.                 if(x3 == 1) {*piOnes += x3;}
  366.                 if(x4 == 1) {*piOnes += x4;}
  367.                 if(x5 == 1) {*piOnes += x5;}
  368.  
  369.                 *pfOnes = *piOnes;
  370.  
  371.                 cout << "Your new score for ones are: " << *piOnes << endl;
  372.                 system("PAUSE");
  373.                 return;
  374.             }
  375.             else if(*pfOnes != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  376.         } // end if(save == 1) iOnes
  377. /***********************************************************************************************************************/
  378. /*TWOS******************************************************************************************************************/
  379.         else if(iSave == 2)
  380.         {
  381.             if(*pfTwos == 0.5)
  382.             {
  383.                 if(x1 == 2) {*piTwos += x1;}
  384.                 if(x2 == 2) {*piTwos += x2;}
  385.                 if(x3 == 2) {*piTwos += x3;}
  386.                 if(x4 == 2) {*piTwos += x4;}
  387.                 if(x5 == 2) {*piTwos += x5;}
  388.  
  389.                 *pfTwos = *piTwos;
  390.  
  391.                 cout << "Your new score for twos are: " << *piTwos << endl;
  392.                 system("PAUSE");
  393.                 return;
  394.             }
  395.             else if(*pfTwos != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  396.         } // end if(save == 2) iTwos
  397. /***********************************************************************************************************************/
  398. /*THREES****************************************************************************************************************/
  399.         else if(iSave == 3)
  400.         {
  401.             if(*pfThrees == 0.5)
  402.             {
  403.                 if(x1 == 3) {*piThrees += x1;}
  404.                 if(x2 == 3) {*piThrees += x2;}
  405.                 if(x3 == 3) {*piThrees += x3;}
  406.                 if(x4 == 3) {*piThrees += x4;}
  407.                 if(x5 == 3) {*piThrees += x5;}
  408.  
  409.                 *pfThrees = *piThrees;
  410.  
  411.                 cout << "Your new score for threes are: " << *piThrees << endl;
  412.                 system("PAUSE");
  413.                 return;
  414.             }
  415.             else if(*pfThrees != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  416.         } // end if(save == 3) iThrees
  417. /***********************************************************************************************************************/
  418. /*FOURS*****************************************************************************************************************/
  419.         else if(iSave == 4)
  420.         {
  421.             if(*pfFours == 0.5)
  422.             {
  423.                 if(x1 == 4) {*piFours += x1;}
  424.                 if(x2 == 4) {*piFours += x2;}
  425.                 if(x3 == 4) {*piFours += x3;}
  426.                 if(x4 == 4) {*piFours += x4;}
  427.                 if(x5 == 4) {*piFours += x5;}
  428.  
  429.                 *pfFours = *piFours;
  430.  
  431.                 cout << "Your new score for fours are: " << *piFours << endl;
  432.                 system("PAUSE");
  433.                 return;
  434.             }
  435.             else if(*pfFours != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  436.         } // end if(save == 4) iFours
  437. /***********************************************************************************************************************/
  438. /*FIVES*****************************************************************************************************************/
  439.         else if(iSave == 5)
  440.         {
  441.             if(*pfFives == 0.5)
  442.             {
  443.                 if(x1 == 5) {*piFives += x1;}
  444.                 if(x2 == 5) {*piFives += x2;}
  445.                 if(x3 == 5) {*piFives += x3;}
  446.                 if(x4 == 5) {*piFives += x4;}
  447.                 if(x5 == 5) {*piFives += x5;}
  448.  
  449.                 *pfFives = *piFives;
  450.  
  451.                 cout << "Your new score for fives are: " << *piFives << endl;
  452.                 system("PAUSE");
  453.                 return;
  454.             }
  455.             else if(*pfFives != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  456.         } // end if(save == 5) iFives
  457. /***********************************************************************************************************************/
  458. /*SIXES*****************************************************************************************************************/
  459.         else if(iSave == 6)
  460.         {
  461.             if(*pfSixes == 0.5)
  462.             {
  463.                 if(x1 == 6) {*piSixes += x1;}
  464.                 if(x2 == 6) {*piSixes += x2;}
  465.                 if(x3 == 6) {*piSixes += x3;}
  466.                 if(x4 == 6) {*piSixes += x4;}
  467.                 if(x5 == 6) {*piSixes += x5;}
  468.  
  469.                 *pfSixes = *piSixes;
  470.  
  471.                 cout << "Your new score for sixes are: " << *piSixes << endl;
  472.                 system("PAUSE");
  473.                 return;
  474.             }
  475.             else if(*pfSixes != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  476.         } // end if(save == 6) iSixes
  477. /***********************************************************************************************************************/
  478. /*PAIR******************************************************************************************************************/
  479.         else if(iSave == 7)
  480.         {
  481.             if(*pfPair == 0.5)
  482.             {
  483.                 if((x1 == x2) || (x1 == x3) || (x1 == x4) || (x1 ==x5))
  484.                 {
  485.                     *piPair = x1 += x1;
  486.  
  487.                     *pfPair = *piPair;
  488.  
  489.                     cout << "Your new score for pair is: " << *piPair << endl;
  490.                     system("PAUSE");
  491.                     return;
  492.                 }
  493.                 else if((x2 == x3) || (x2 == x4) || (x2 == x5))
  494.                 {
  495.                     *piPair = x2 += x2;
  496.  
  497.                     *pfPair = *piPair;
  498.  
  499.                     cout << "Your new score for pair is: " << *piPair << endl;
  500.                     system("PAUSE");
  501.                     return;
  502.                 }
  503.                 else if((x3 == x4) || (x3 == x5))
  504.                 {
  505.                     *piPair = x3 += x3;
  506.  
  507.                     *pfPair = *piPair;
  508.  
  509.                     cout << "Your new score for pair is: " << *piPair << endl;
  510.                     system("PAUSE");
  511.                     return;
  512.                 }
  513.                 else if((x4 == x5))
  514.                 {
  515.                     *piPair = x4 += x4;
  516.  
  517.                     *pfPair = *piPair;
  518.  
  519.                     cout << "Your new score for pair is: " << *piPair << endl;
  520.                     system("PAUSE");
  521.                     return;
  522.                 }
  523.                 else {cout << "Your new score for pair is: " << *piPair << endl; *pfPair = 0; system("PAUSE"); return; }
  524.             }
  525.             else if(*pfPair != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  526.         } // End if(save == 7) iPair
  527. /***********************************************************************************************************************/
  528. /*TWO*PAIR**************************************************************************************************************/
  529.         else if(iSave == 8)
  530.         {
  531.             if(*pfTwoPair == 0.5)
  532.             {
  533.                 if(x1 == x2 && (x3 == x4 || x3 == x5))
  534.                 {
  535.                     *piTwoPair = x1 + x1 + x3 + x3;
  536.  
  537.                     *pfTwoPair = *piTwoPair;
  538.  
  539.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  540.                     system("PAUSE");
  541.                     return;
  542.                 }
  543.                 else if(x1 == x2 && x4 == x5)
  544.                 {
  545.                     *piTwoPair = x1 + x1 + x4 + x4;
  546.  
  547.                     *pfTwoPair = *piTwoPair;
  548.  
  549.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  550.                     system("PAUSE");
  551.                     return;
  552.                 }
  553.                 else if(x1 == x3 && (x2 == x4 || x2 == x5))
  554.                 {
  555.                     *piTwoPair = x1 + x1 + x2 + x2;
  556.  
  557.                     *pfTwoPair = *piTwoPair;
  558.  
  559.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  560.                     system("PAUSE");
  561.                     return;
  562.                 }
  563.                 else if(x1 == x3 && x4 == x5)
  564.                 {
  565.                     *piTwoPair = x1 + x1 + x4 + x4;
  566.  
  567.                     *pfTwoPair = *piTwoPair;
  568.  
  569.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  570.                     system("PAUSE");
  571.                     return;
  572.                 }
  573.                 else if(x1 == x4 && (x2 == x3 || x2 == x5))
  574.                 {
  575.                     *piTwoPair = x1 + x1 + x2 + x2;
  576.  
  577.                     *pfTwoPair = *piTwoPair;
  578.  
  579.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  580.                     system("PAUSE");
  581.                     return;
  582.                 }
  583.                 else if(x1 == x4 && x3 == x5)
  584.                 {
  585.                     *piTwoPair = x1 + x1 + x3 + x3;
  586.  
  587.                     *pfTwoPair = *piTwoPair;
  588.  
  589.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  590.                     system("PAUSE");
  591.                     return;
  592.                 }
  593.                 else if(x1 == x5 && (x2 == x3 || x2 == x4))
  594.                 {
  595.                     *piTwoPair = x1 + x1 + x2 + x2;
  596.  
  597.                     *pfTwoPair = *piTwoPair;
  598.  
  599.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  600.                     system("PAUSE");
  601.                     return;
  602.                 }
  603.                 else if(x1 == x5 && x3 == x4)
  604.                 {
  605.                     *piTwoPair = x1 + x1 + x3 + x3;
  606.  
  607.                     *pfTwoPair = *piTwoPair;
  608.  
  609.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  610.                     system("PAUSE");
  611.                     return;
  612.                 }
  613.                 else if(x2 == x3 && x4 == x5)
  614.                 {
  615.                     *piTwoPair = x2 + x2 + x4 + x4;
  616.  
  617.                     *pfTwoPair = *piTwoPair;
  618.  
  619.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  620.                     system("PAUSE");
  621.                     return;
  622.                 }
  623.                 else if(x2 == x4 && x3 == x5)
  624.                 {
  625.                     *piTwoPair = x2 + x2 + x3 + x3;
  626.  
  627.                     *pfTwoPair = *piTwoPair;
  628.  
  629.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  630.                     system("PAUSE");
  631.                     return;
  632.                 }
  633.                 else if(x2 == x5 && x3 == x4)
  634.                 {
  635.                     *piTwoPair = x2 + x2 + x3 + x3;
  636.  
  637.                     *pfTwoPair = *piTwoPair;
  638.  
  639.                     cout << "Your new score for two-pair is: " << *piTwoPair << endl;
  640.                     system("PAUSE");
  641.                     return;
  642.                 }
  643.                 else { cout << "Your new score for two-pair is: " << *piTwoPair << endl; *pfTwoPair = 0; system("PAUSE"); return; }
  644.             }
  645.             else if(*pfTwoPair != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  646.         } // End if(save == 8 ) iTwoPair
  647. /***********************************************************************************************************************/
  648. /*THREE*OF*A*KIND*******************************************************************************************************/
  649.         else if(iSave == 9)
  650.         {
  651.             if(*pfThreeOfaKind == 0.5)
  652.             {
  653.                 if((x1 == x2) && (x1 == x3 || x1 == x4 || x1 == x5))
  654.                 {
  655.                     *piThreeOfaKind = x1 + x1 + x1;
  656.                     *pfThreeOfaKind = *piThreeOfaKind;
  657.  
  658.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  659.                     system("PAUSE");
  660.                     return;
  661.                 }
  662.                 else if((x1 == x3) && (x1 == x4 || x1 == x5))
  663.                 {
  664.                     *piThreeOfaKind = x1 + x1 + x1;
  665.                     *pfThreeOfaKind = *piThreeOfaKind;
  666.  
  667.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  668.                     system("PAUSE");
  669.                     return;
  670.                 }
  671.                 else if((x1 == x4) && (x1 == x5))
  672.                 {
  673.                     *piThreeOfaKind = x1 + x1 + x1;
  674.                     *pfThreeOfaKind = *piThreeOfaKind;
  675.  
  676.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  677.                     system("PAUSE");
  678.                     return;
  679.                 }
  680.                 else if((x2 == x3) && (x2 == x4 || x2 == x5))
  681.                 {
  682.                     *piThreeOfaKind = x2 + x2 + x2;
  683.                     *pfThreeOfaKind = *piThreeOfaKind;
  684.  
  685.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  686.                     system("PAUSE");
  687.                     return;
  688.                 }
  689.                 else if((x2 == x4) && (x2 == x5))
  690.                 {
  691.                     *piThreeOfaKind = x2 + x2 + x2;
  692.                     *pfThreeOfaKind = *piThreeOfaKind;
  693.  
  694.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  695.                     system("PAUSE");
  696.                     return;
  697.                 }
  698.                 else if((x3 == x4) && (x3 == x5))
  699.                 {
  700.                     *piThreeOfaKind = x3 + x3 + x3;
  701.                     *pfThreeOfaKind = *piThreeOfaKind;
  702.  
  703.                     cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl;
  704.                     system("PAUSE");
  705.                     return;
  706.                 }
  707.                 else { cout << "Your new score for three of a kind is: " << *piThreeOfaKind << endl; *pfThreeOfaKind = 0; system("PAUSE"); return; }
  708.             }
  709.  
  710.             else if(*pfThreeOfaKind != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  711.         } // end if(save == 9) iThreeOfaKind
  712. /***********************************************************************************************************************/
  713. /*FOUR*OF*A*KIND********************************************************************************************************/
  714.         else if(iSave == 10)
  715.         {
  716.             if(*pfFourOfaKind == 0.5)
  717.             {
  718.                 if((x1 == x2) && (x1 == x3) && (x1 == x4 || x1 == x5))
  719.                 {
  720.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  721.                     *pfFourOfaKind = *piFourOfaKind;
  722.  
  723.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  724.                     system("PAUSE");
  725.                     return;
  726.                 }
  727.                 else if((x1 == x2) && (x1 == x4) && (x1 == x3 || x1 == x5))
  728.                 {
  729.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  730.                     *pfFourOfaKind = *piFourOfaKind;
  731.  
  732.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  733.                     system("PAUSE");
  734.                     return;
  735.                 }
  736.                 else if((x1 == x2) && (x1 == x5) && (x1 == x3 || x1 == x4))
  737.                 {
  738.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  739.                     *pfFourOfaKind = *piFourOfaKind;
  740.  
  741.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  742.                     system("PAUSE");
  743.                     return;
  744.                 }
  745.                 else if((x1 == x3) && (x1 == x4) && (x1 == x2 || x1 == x5))
  746.                 {
  747.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  748.                     *pfFourOfaKind = *piFourOfaKind;
  749.  
  750.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  751.                     system("PAUSE");
  752.                     return;
  753.                 }
  754.                 else if((x1 == x3) && (x1 == x5) && (x1 == x2 || x1 == x4))
  755.                 {
  756.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  757.                     *pfFourOfaKind = *piFourOfaKind;
  758.  
  759.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  760.                     system("PAUSE");
  761.                     return;
  762.                 }
  763.                 else if((x1 == x4) && (x1 == x5) && (x1 == x2 || x1 == x3))
  764.                 {
  765.                     *piFourOfaKind = x1 + x1 + x1 + x1;
  766.                     *pfFourOfaKind = *piFourOfaKind;
  767.  
  768.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  769.                     system("PAUSE");
  770.                     return;
  771.                 }
  772.                 else if((x2 == x3) && (x2 == x4) && (x2 == x5))
  773.                 {
  774.                     *piFourOfaKind = x2 + x2 + x2 + x2;
  775.                     *pfFourOfaKind = *piFourOfaKind;
  776.  
  777.                     cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl;
  778.                     system("PAUSE");
  779.                     return;
  780.                 }
  781.                 else { cout << "Your new score for four of a kind is: " << *piFourOfaKind << endl; *pfFourOfaKind = 0; system("PAUSE"); return; }
  782.             }
  783.             else if(*pfFourOfaKind != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  784.         } // End if(save == 10) iFourOfaKind
  785. /***********************************************************************************************************************/
  786. /*SMALL*STRAIGHT********************************************************************************************************/
  787.         else if(iSave == 11)
  788.         {
  789.             if(*pfSmallStraight == 0.5)
  790.             {
  791.                 if(x1 != x2 && x1 != x3 && x1 != x4 && x1 != x5)
  792.                 {
  793.                     if(x2 != x3 && x2 != x4 && x2 != x5)
  794.                     {
  795.                         if(x3 != x4 && x3 != x5)
  796.                         {
  797.                             if(x4 != x5)
  798.                             {
  799.                                 if(x1 != 6 && x2 != 6 && x3 != 6 && x4 != 6 && x5 != 6)
  800.                                 {
  801.                                     *piSmallStraight = x1 + x2 + x3 + x4 + x5;
  802.                                     *pfSmallStraight = *piSmallStraight;
  803.  
  804.                                     cout << "Your new score for Small Straight is: " << *piSmallStraight << endl;
  805.                                     system("PAUSE");
  806.                                     return;
  807.                                 }
  808.                                 else { cout << "Your new score for Small Straight is: " << *piSmallStraight << endl; *pfSmallStraight = 0; system("PAUSE"); return; }
  809.                             }
  810.                             else { cout << "Your new score for Small Straight is: " << *piSmallStraight << endl; *pfSmallStraight = 0; system("PAUSE"); return; }
  811.                         }
  812.                         else { cout << "Your new score for Small Straight is: " << *piSmallStraight << endl; *pfSmallStraight = 0; system("PAUSE"); return; }
  813.                     }
  814.                     else { cout << "Your new score for Small Straight is: " << *piSmallStraight << endl; *pfSmallStraight = 0; system("PAUSE"); return; }
  815.                 }
  816.                 else { cout << "Your new score for Small Straight is: " << *piSmallStraight << endl; *pfSmallStraight = 0; system("PAUSE"); return; }
  817.             }
  818.             else if(*pfSmallStraight != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  819.         } // End if(save == 11) iSmallStraight
  820. /***********************************************************************************************************************/
  821. /*LARGE*STRAIGHT********************************************************************************************************/
  822.         else if(iSave == 12)
  823.         {
  824.             if(*pfLargeStraight == 0.5)
  825.             {
  826.                 if(x1 != x2 && x1 != x3 && x1 != x4 && x1 != x5)
  827.                 {
  828.                     if(x2 != x3 && x2 != x4 && x2 != x5)
  829.                     {
  830.                         if(x3 != x4 && x3 != x5)
  831.                         {
  832.                             if(x4 != x5)
  833.                             {
  834.                                 if(x1 != 1 && x2 != 1 && x3 != 1 && x4 != 1 && x5 != 1)
  835.                                 {
  836.                                     *piLargeStraight = x1 + x2 + x3 + x4 + x5;
  837.                                     *pfLargeStraight = *piLargeStraight;
  838.  
  839.                                     cout << "Your new score for Large Straight is: " << *piLargeStraight << endl;
  840.                                     system("PAUSE");
  841.                                     return;
  842.  
  843.                                 }
  844.                                 else { cout << "Your new score for Large Straight is: " << *piLargeStraight << endl; *pfLargeStraight = 0; system("PAUSE"); return; }
  845.                             }
  846.                             else { cout << "Your new score for Large Straight is: " << *piLargeStraight << endl; *pfLargeStraight = 0; system("PAUSE"); return; }
  847.                         }
  848.                         else { cout << "Your new score for Large Straight is: " << *piLargeStraight << endl; *pfLargeStraight = 0; system("PAUSE"); return; }
  849.                     }
  850.                     else { cout << "Your new score for Large Straight is: " << *piLargeStraight << endl; *pfLargeStraight = 0; system("PAUSE"); return; }
  851.                 }
  852.                 else { cout << "Your new score for Large Straight is: " << *piLargeStraight << endl; *pfLargeStraight = 0; system("PAUSE"); return; }
  853.             }
  854.             else if(*pfLargeStraight != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  855.         } // End if(save == 12) iLargeStraight
  856. /***********************************************************************************************************************/
  857. /*FULL*HOUSE************************************************************************************************************/
  858.         else if(iSave == 13)
  859.         {
  860.             if(*pfFullhouse == 0.5)
  861.             {
  862.                 if((x1 == x2 && x1 == x3) && (x4 == x5))
  863.                 {
  864.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  865.                     *pfFullhouse = *piFullhouse;
  866.  
  867.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  868.                     system("PAUSE");
  869.                     return;
  870.                 }
  871.                 else if((x1 == x2 && x1 == x4) && (x3 == x5))
  872.                 {
  873.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  874.                     *pfFullhouse = *piFullhouse;
  875.  
  876.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  877.                     system("PAUSE");
  878.                     return;
  879.                 }
  880.                 else if((x1 == x2 && x1 == x5) && (x3 == x4))
  881.                 {
  882.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  883.                     *pfFullhouse = *piFullhouse;
  884.  
  885.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  886.                     system("PAUSE");
  887.                     return;
  888.                 }
  889.                 else if((x1 == x3 && x1 == x4) && (x2 == x5))
  890.                 {
  891.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  892.                     *pfFullhouse = *piFullhouse;
  893.  
  894.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  895.                     system("PAUSE");
  896.                     return;
  897.                 }
  898.                 else if((x1 == x3 && x1 == x5) && (x2 == x4))
  899.                 {
  900.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  901.                     *pfFullhouse = *piFullhouse;
  902.  
  903.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  904.                     system("PAUSE");
  905.                     return;
  906.                 }
  907.                 else if((x1 == x4 && x1 == x5) && (x2 == x3))
  908.                 {
  909.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  910.                     *pfFullhouse = *piFullhouse;
  911.  
  912.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  913.                     system("PAUSE");
  914.                     return;
  915.                 }
  916.                 else if((x2 == x3 && x2 == x4) && (x1 == x5))
  917.                 {
  918.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  919.                     *pfFullhouse = *piFullhouse;
  920.  
  921.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  922.                     system("PAUSE");
  923.                     return;
  924.                 }
  925.                 else if((x2 == x3 && x2 == x5) && (x1 == x4))
  926.                 {
  927.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  928.                     *pfFullhouse = *piFullhouse;
  929.  
  930.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  931.                     system("PAUSE");
  932.                     return;
  933.                 }
  934.                 else if((x2 == x4 && x2 == x5) && (x1 == x3))
  935.                 {
  936.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  937.                     *pfFullhouse = *piFullhouse;
  938.  
  939.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  940.                     system("PAUSE");
  941.                     return;
  942.                 }
  943.                 else if((x3 == x4 && x3 == x5) && (x1 == x2))
  944.                 {
  945.                     *piFullhouse = x1 + x2 + x3 + x4 + x5;
  946.                     *pfFullhouse = *piFullhouse;
  947.  
  948.                     cout << "Your new score for Full House is: " << *piFullhouse << endl;
  949.                     system("PAUSE");
  950.                     return;
  951.                 }
  952.                 else { cout << "Your new score for Full House is: " << *piFullhouse << endl; *pfFullhouse = 0; system("PAUSE"); return; }
  953.             }
  954.             else if(*pfFullhouse != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  955.         } // End if(save == 13) iFullHouse
  956. /***********************************************************************************************************************/
  957. /*CHANCE****************************************************************************************************************/
  958.         else if(iSave == 14)
  959.         {
  960.             if(*pfChance == 0.5)
  961.             {
  962.                 *piChance = x1 + x2 + x3 + x4 + x5;
  963.  
  964.                 *pfChance = *piChance;
  965.  
  966.                 cout << "Your new score for chance are: " << *piChance << endl;
  967.                 system("PAUSE");
  968.                 return;
  969.             }
  970.             else if(*pfChance != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  971.         } //End if(save == 14) iChance
  972. /***********************************************************************************************************************/
  973. /*YAHTZEE***************************************************************************************************************/
  974.         else if(iSave == 15)
  975.         {
  976.             if(*pfYahtzee == 0.5)
  977.             {
  978.                 if((x1 == x2) && (x1 == x3) && (x1 == x4) && (x1 == x5))
  979.                 {
  980.                     *piYahtzee = 50;
  981.  
  982.                     *pfYahtzee = *piYahtzee;
  983.  
  984.                     cout << "Your new score for chance are: " << *piYahtzee << endl;
  985.                     system("PAUSE");
  986.                     return;
  987.                 }
  988.                 else { cout << "Your new score for Yahtzee are: " << *piYahtzee << endl; *pfYahtzee = 0; system("PAUSE"); return; }
  989.             }
  990.             else if(*pfYahtzee != 0.5) { cout << "Sorry, You already saved that slot." << endl; system("PAUSE"); }
  991.         } // End if(save == 15) iYahtzee
  992. /***********************************************************************************************************************/
  993.  
  994.     } // End for-loop
  995.  
  996.  
  997.     return;
  998. }
  999.  
  1000. void Rules()
  1001. {
  1002.     system("CLS");
  1003.  
  1004.     cout << "RULES OF YAHTZEE (EUROPEAN VERSION)" << endl << endl << endl << endl;
  1005.  
  1006.     cout << "Yahtzee is kind of a mix between a dice game and a regulare poker game." << endl << endl;
  1007.     cout << "1. You roll 5 dice a maximum of 3 times" << endl << endl;;
  1008.     cout << "2. After rolling the dice, you will be promted to save them in a slot." << endl << endl;
  1009.     cout << "You get as many points as the sum of the dice you are saving." << endl;
  1010.     cout << "The dice must meet the right requirements to give you any score (see below)." << endl;
  1011.     cout << "You can save the dice even if they doesn't meet the requirements (for 0 score)!" << endl << endl;
  1012.     cout << "3. Requirments:" << endl << endl;
  1013.     cout << "Ones: Only dice with number 1 will give you points." << endl;
  1014.     cout << "Twos: Only dice with number 2 will give you points." << endl;
  1015.     cout << "Threes: Only dice with number 3 will give you points." << endl;
  1016.     cout << "Fours: Only dice with number 4 will give you points." << endl;
  1017.     cout << "Fives: Only dice with number 5 will give you points." << endl;
  1018.     cout << "Sixes: Only dice with number 6 will give you points." << endl;
  1019.     cout << "Pair: Only 2 dice of the same number give points." << endl;
  1020.     cout << "Two Pair: Only 2 pairs will give you points (2, 2, 4, 4, 0)" << endl;
  1021.     cout << "Three of a kind: Only 3 dice of same number give points." << endl;
  1022.     cout << "Four of a kind: Only 4 dice of same number give points." << endl;
  1023.     cout << "Small Straight: Only a straight from 1-5 give points." << endl;
  1024.     cout << "Large Straight: Only a straight from 2-6 give points." << endl;
  1025.     cout << "Full House: Only a pair + a three of a kind give points (1, 1, 1, 2, 2)." << endl;
  1026.     cout << "Chance: You can save anything in the chance slot." << endl;
  1027.     cout << "YAHTZEE: All dice must be of same number to give points." << endl;
  1028.     cout << endl << endl;
  1029.  
  1030.     system("PAUSE");
  1031.     return;
  1032. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement