Advertisement
Cnvmendoza

Real Complete Trading

Nov 15th, 2021 (edited)
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 76.53 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <sstream>
  4. #include <cstdlib>
  5. #include <time.h>
  6. using namespace std;
  7. //Escape add
  8. float random(float x);
  9. string input;
  10. //Global
  11. //Inventory
  12. int potInv = 0, oilInv = 0, fishInv = 0, woolInv = 0, velvetInv = 0, toolsInv = 0, spiceInv = 0, ironInv = 0, flourInv = 0, dyeInv = 0, leatherInv = 0, furInv = 0, beerInv = 0, saltInv = 0, wineInv = 0;
  13. int qty = 0;    //quantity
  14. int inv = 0;
  15. //User
  16. float balance = 5000;
  17. //Trade Goods Prices, in order: Sweden, Poland
  18. //Escape-add;
  19. float x;
  20. float randomnum = random(x);
  21. float potPrice[7] = {90, 157.5, 157.5, 99, 67.5, 99, 90};
  22. float oilPrice[7] = {400, 300, 700, 700, 440, 440, 400};
  23. float fishPrice[7] = {50, 55, 87.5, 55, 87.5, 55, 50};
  24. float woolPrice[7] = {240, 180, 180, 264, 264, 264, 240};
  25. float velvetPrice[7] = {950, 1662.5, 1662.5, 990, 712.5, 990, 950};
  26. float toolsPrice[7] = {400, 300, 700, 440, 440, 400};
  27. float spicePrice[7] = {800, 1400, 600, 880, 600, 880, 800};
  28. float ironPrice[7] = {220, 365, 365, 365, 165, 242, 220};
  29. float flourPrice[7] = {50, 37.5, 87.5, 55, 87.5, 55, 50};
  30. float dyePrice[7] = {180, 198, 135, 198, 198, 198, 180};
  31. float leatherPrice[7] = {180, 198, 315, 135, 135, 198, 180};
  32. float furPrice[7] = {390, 429, 292.5, 429, 429, 429, 390};
  33. float beerPrice[7] = {100, 75, 175, 175, 175, 110, 100};
  34. float saltPrice[7] = {220, 165, 385, 165, 165, 242, 220};
  35. float winePrice[7] = {200, 220, 150, 220, 220, 220, 200};
  36.  
  37. float price;
  38. float priceArrays[100];
  39. //Country Mem
  40. string country = "None";    //Starting
  41. string place[7] = { "Sweden", "Poland", "Russia", "Crimea", "Saudi Arabia", "Ukraine", "China"};
  42. int land;   //index
  43. //Country Inv (Default inv)
  44. //surplus 200%;
  45. //well-met 100%;
  46. //high 75%; med 50%; low 25%;
  47. int potInvSwede = 150, potInvPol = 50, potInvRus = 100, potInvCri = 75, potInvSau= 150, potInvUkr= 75, potInvChi= 100; //well 100
  48. int oilInvSwede = 25, oilInvPol = 75, oilInvRus = 45, oilInvCri= 25, oilInvSau= 38, oilInvUkr= 38, oilInvChi= 50; //well 50
  49. int fishInvSwede = 150,     fishInvPol = 113,   fishInvRus = 75,    fishInvCri= 113,        fishInvSau = 75,    fishInvUkr = 113,   fishInvChi = 150; //well 75
  50. int woolInvSwede = 75,      woolInvPol = 56,    woolInvRus = 113,   woolInvCri= 56,         woolInvSau = 56,    woolInvUkr = 56,    woolInvChi=75; //well 75
  51. int velvetInvSwede =25,     velvetInvPol = 13,  velvetInvRus = 13,  velvetInvCri = 19,      velvetInvSau=38,    velvetInvUkr = 19,  velvetInvChi=25; //well 25
  52. int toolsInvSwede = 50,     toolsInvPol = 75,   toolsInvRus = 38,   toolsInvCri=38,         toolsInvSau=38,     toolsInvUkr = 38,   toolsInvChi=50; //well 50
  53. int spiceInvSwede = 30,     spiceInvPol = 15,   spiceInvRus = 45,   spiceInvCri= 23,        spiceInvSau= 23,    spiceInvUkr = 23,   spiceInvChi=30; //well 30
  54. int ironInvSwede = 100,     ironInvPol = 50,    ironInvRus = 50,    ironInvCri= 50,         ironInvSau=75,      ironInvUkr = 75,    ironInvChi = 100; //well 100
  55. int flourInvSwede = 150,    flourInvPol = 113,  flourInvRus = 75,   flourInvCri= 113,       flourInvSau= 75,    flourInvUkr = 113,  flourInvChi = 150; //well 150
  56. int dyeInvSwede = 75,       dyeInvPol = 56,     dyeInvRus= 113,     dyeInvCri = 56,         dyeInvSau= 56,      dyeInvUkr = 56,     dyeInvChi = 75; //well 75
  57. int leatherInvSwede = 75,   leatherInvPol = 56, leatherInvRus = 38, leatherInvCri = 113,    leatherInvSau=56,   leatherInvUkr = 56, leatherInvChi = 75; //well 75
  58. int furInvSwede = 75,       furInvPol = 56,     furInvRus = 113,    furInvCri = 56,         furInvSau=56,       furInvUkr = 56,     furInvChi = 75; //well 75
  59. int beerInvSwede =75,       beerInvPol = 113,   beerInvRus = 56,    beerInvCri = 38,        beerInvSau=38,      beerInvUkr = 56,    beerInvChi = 75; //well 75
  60. int saltInvSwede =75,       saltInvPol = 38,    saltInvRus = 56,    saltInvCri = 113,       saltInvSau=113,     saltInvUkr = 56,    saltInvChi = 75; //well 75
  61. int wineInvSwede =75,       wineInvPol = 56,    wineInvRus = 56,    wineInvCri = 113,       wineInvSau=56,      wineInvUkr = 56,    wineInvChi = 75; //well 75
  62.  
  63.  
  64. int inv_Country = 0;
  65. //Goods
  66. string tradeGoods[15] = { "Pottery ", "Oil ", "Fish ", "Wool Cloth ", "Velvet " , "Tools ", "Spices ", "Iron ", "Flour ", "Dyes ", "Leatherworks ", "Fur ", "Beer " , "Salt ", "Wine " };int goodNo;
  67. int goodType;
  68. //int remember strings
  69. int mem = 0;    //inv
  70. int mem2 = 0;   //notes
  71. int mem3 = 0;   //buy/sell
  72. //Turn Counter;
  73. //event variables
  74. int GOOJcard=0;
  75. int turn=1;
  76. int investment=0;
  77. int event35=0;
  78. int Cauldron=0;
  79. //End of Global
  80. //Escape add
  81. void random(void);
  82. //What do I do first?
  83. void loc(void);
  84.  
  85. //User's Inventory
  86. void check(void);
  87.  
  88. //Trade
  89. void trade(void);
  90.  
  91. //Buy function
  92. void buy(void);
  93.  
  94. //traded
  95. void traded(void);
  96.  
  97. //Quantity function
  98. void quantity(void);
  99.  
  100. //lack function
  101. void lack(void);
  102.  
  103. //Sell function
  104. void sell(void);
  105.  
  106. //Goods function
  107. void goods(void);
  108.  
  109. //Notes function
  110. void notes(void);
  111.  
  112. //Balance function
  113. void balance_balance(void);
  114.  
  115. //todo
  116. void todo(void);
  117. void todo2(void);
  118.  
  119. //Country Inventory
  120. void countryInv(void);
  121. void determineCountry(void);
  122. //Turn-based Events
  123. void turnCounter(void);
  124. void eventsNumbers(void);
  125. void events(int random);
  126.  
  127. main(){
  128.     loc();
  129. if(balance<0)
  130. {
  131. cout << "You are now bankrupt. Game Over.";
  132. }
  133. else
  134. {
  135. cout<<"Your total money came to:" << balance;
  136. }
  137. cout << "/nThanks for playing this simulator.";
  138.  
  139. return 0;
  140. }
  141.  
  142. //loc function
  143. void loc(void){
  144.     if (turn<50)
  145.     {
  146.         cout<<"Turn: "<<turn<<endl;
  147.         eventsNumbers();
  148.     }
  149.     else if (turn==50)
  150.     {
  151.     cout<<"Turn: "<<turn<<" (LAST TURN!)"<<endl;
  152.     eventsNumbers();
  153.     }
  154.     else
  155.     {
  156.     return;
  157.     }
  158.    
  159. if (balance<0)
  160.     {
  161.     return;
  162. }
  163.     country = "None";
  164.     int x = 0;
  165.     mem = 0;
  166.     mem2 = 0;
  167.     cout << endl;
  168.     cout << endl;
  169. cout << "Balance: Eur " << balance; cout << endl;
  170.     cout << "What do you want to do?";
  171.     cout << endl;
  172.     cout << "[1] Trade";
  173.     cout << endl;
  174.     cout << "[2] Check Inventory";
  175.     cout << endl;
  176.     do {
  177.         cout << "Enter Input: ";
  178.         cin >> input;
  179.         stringstream(input) >> x;
  180.         switch (x)
  181.         {
  182.             case 1:
  183.                 trade();
  184.                 break;
  185.             case 2:
  186.                 check();
  187.                 break;
  188.             default:
  189.                 cout << "That's an invalid option. Please try again.";
  190.         }
  191.         cout << endl;
  192.     } while (input != "1" || input != "2");
  193. }
  194.  
  195. //check function
  196. void check(void){
  197.       cout << endl;
  198.     cout << "You currently have:";
  199.     cout << endl;
  200.     cout << potInv << " Pottery";
  201.     cout << endl;
  202.     cout << oilInv << " Oil";
  203.     cout << endl;
  204.     //potInv = 0, oilInv = 0; fishInv = 0; woolInv=0; velvetInv=0; toolsInv=0; spiceInv=0; ironInv=0; flourInv=0; dyeInv=0; leatherInv=0; furInv=0; beerInv=0, saltInv=0; wineInv=0;
  205.     cout << fishInv << " Fish";
  206.     cout << endl;
  207.     cout << woolInv << " Wool Cloth";
  208.     cout << endl;
  209.     cout << velvetInv << " Velvet";
  210.     cout << endl;
  211.     cout << toolsInv << " Tools";
  212.     cout << endl;
  213.     cout << spiceInv << " Spice";
  214.     cout << endl;
  215.     cout << ironInv << " Iron";
  216.     cout << endl;
  217.     cout << flourInv << " Flour";
  218.     cout << endl;
  219.     cout << dyeInv << " Dye";
  220.     cout << endl;
  221.     cout << leatherInv << " Leatherworks";
  222.     cout << endl;
  223.     cout << furInv << " Fur";
  224.     cout << endl;
  225.     cout << beerInv << " Beer";
  226.     cout << endl;
  227.     cout << saltInv << " Salt";
  228.     cout << endl;
  229.     cout << wineInv << " Wine";
  230.  
  231.         cout << endl;
  232.     cout << " ...in your inventory.";
  233.     cout << endl;
  234.     system("pause");
  235.     switch (mem){
  236.         case 0:
  237.             loc();
  238.             break;
  239.         case 1:
  240.             trade();
  241.             break;
  242.         case 2:
  243.             buy();
  244.             break;
  245.         case 3:
  246.             sell();
  247.             break;
  248.         case 4:
  249.             todo2();
  250.             break;
  251.     }
  252. }
  253.  
  254. //trade function
  255. void trade(void){
  256.     mem = 1;
  257.     string input;
  258.     country = "None";
  259.     mem2 = 1;
  260.     int x;
  261.     cout << endl;
  262.     cout << "Country List: ";
  263.     cout << endl;
  264.     cout << "[1] " << "Sweden";
  265.     cout << endl;
  266.     cout << "[2] " << "Poland";
  267.     cout << endl;
  268.       cout << "[3] " << "Russia";
  269.       cout << endl;
  270.    
  271.     cout << "[4] " << "Crimea";
  272.     cout << endl;
  273.     cout << "[5] " << "Saudi Arabia";
  274.     cout << endl;
  275.     cout << "[6] " << "Ukraine";
  276.     cout << endl;
  277.     cout << "[7] " << "China";
  278.     cout << endl;
  279.     cout << "[8] " << "Check inventory";
  280.     cout << endl;
  281.     cout << "[9] " << "Check notes";
  282.     cout << endl;
  283.     cout << "[10] " << "Return";
  284.     cout << endl;
  285.  
  286.         cout << "Enter Input: ";
  287.         cin >> input;
  288.         stringstream(input) >> x;
  289.         switch (x){
  290. case 1:
  291.                 land = 0; // Sweden
  292.                 todo();
  293.                 break;
  294.             case 2:
  295.                 land = 1; // Poland
  296.                 todo();
  297.                 break;
  298.             case 3:
  299.                 land = 2; // Russia
  300.                 todo();
  301.                 break;
  302.             case 4:
  303.                 land = 3; // Crimea
  304.                 todo();
  305.                 break;
  306.             case 5:
  307.                 land = 4; // Saudi
  308.                 todo();
  309.                 break;
  310.             case 6:
  311.                 land = 5; // Ukraine
  312.                 todo();
  313.                 break;
  314.             case 7:
  315.                 land = 6; // China
  316.                 todo();
  317.                 break;
  318.             case 8:
  319.                 check();
  320.                 break;
  321.             case 9:
  322.                 notes();
  323.                 break;
  324.             case 10:
  325.                 loc();
  326.                 break;
  327.  
  328.                                     default:
  329.                 cout << "That's an invalid option. Please try again.";
  330.                 cout << endl;
  331.                 break;
  332.         } while (input != "1" || input != "2" || input != "3" || input != "4" || input != "5" || input != "6"|| input != "7" || input !="8" || input != "9" || input != "10");
  333.         cout << endl;
  334. }
  335.  
  336. //goods function
  337. void goods(void){
  338.     cout << setprecision(2) << fixed;
  339.     cout << endl;
  340.     random();
  341.     cout << "[16] " << "Check inventory";
  342.     cout << endl;
  343.     cout << "[17] " << "Check notes";
  344.     cout << endl;
  345.     cout << "[18] " << "Return";
  346.     cout << endl;
  347. }
  348.  
  349. //buy function
  350. void buy(void){
  351.     string input;
  352.     int x;
  353.     mem = 2;
  354.     mem2 = 2;
  355.     mem3 = 0;
  356.     if (land == 0){
  357.         cout << endl;
  358.         cout << "You are trading with Sweden ... ";
  359.         cout << endl;
  360.     }
  361.     else if (land == 1){
  362.         cout << endl;
  363.         cout << "You are trading with Poland ... ";
  364.         cout << endl;
  365.     }
  366.       else if (land == 2){
  367.         cout << endl;
  368.         cout << "You are trading with Russia ... ";
  369.         cout << endl;
  370.     }
  371.    else if (land == 3){
  372.         cout << endl;
  373.         cout << "You are trading with Crimea . . . ";
  374.         cout << endl;
  375.     }
  376.     else if (land == 4){
  377.         cout << endl;
  378.         cout << "You are trading with Saudi Arabia . . . ";
  379.         cout << endl;
  380.     }
  381.     else if (land == 5){
  382.         cout << endl;
  383.         cout << "You are trading with Ukraine . . . ";
  384.         cout << endl;
  385.     }
  386.     else if (land == 6){
  387.         cout << endl;
  388.         cout << "You are trading with China . . . ";
  389.         cout << endl;
  390.     }
  391.  
  392.     country = "None";
  393.     balance_balance();
  394.     goods();
  395.     cout << "What do you want to buy? ";
  396.     cout << endl;
  397.     do{
  398.     cout << "Enter Input: ";
  399.     cin >> input;
  400.     stringstream(input) >> x;
  401.     switch (x){
  402.         case 1:
  403.             goodType = 0;
  404.             determineCountry();
  405.             inv = potInv;
  406.             price = priceArrays[goodType];
  407.             quantity();
  408.             if (balance < qty *price){
  409.                 lack();
  410.                 break;
  411.             }
  412.             else if (balance >= qty *price){
  413.                 traded();
  414.                 break;
  415.             }
  416.  
  417.         case 2:
  418.             goodType = 1;
  419.             determineCountry();
  420.             inv = oilInv;
  421.             price = priceArrays[goodType];
  422.             quantity();
  423.             if (balance < qty *price){
  424.                 lack();
  425.                 break;
  426.             }
  427.             else if (balance >= qty *price){
  428.                 traded();
  429.                 break;
  430.             }
  431.         case 3:
  432.             goodType = 2;
  433.             determineCountry();
  434.             inv = fishInv;
  435.             price = priceArrays[goodType];
  436.             quantity();
  437.             if (balance < qty *price){
  438.                 lack();
  439.                 break;
  440.             }
  441.             else if (balance >= qty *price){
  442.                 traded();
  443.                 break;
  444.             }
  445.         case 4:
  446.             goodType = 3;
  447.             determineCountry();
  448.             inv = woolInv;
  449.             price = priceArrays[goodType];
  450.             quantity();
  451.             if (balance < qty *price){
  452.                 lack();
  453.                 break;
  454.             }
  455.             else if (balance >= qty *price){
  456.                 traded();
  457.                 break;
  458.             }
  459.         case 5:
  460.             goodType = 4;
  461.             determineCountry();
  462.             inv = velvetInv;
  463.             price = priceArrays[goodType];
  464.             quantity();
  465.             if (balance < qty *price){
  466.                 lack();
  467.                 break;
  468.             }
  469.             else if (balance >= qty *price){
  470.                 traded();
  471.                 break;
  472.             }
  473.         case 6:
  474.             goodType = 5;
  475.             determineCountry();
  476.             inv = toolsInv;
  477.             price = priceArrays[goodType];
  478.             quantity();
  479.             if (balance < qty *price){
  480.                 lack();
  481.                 break;
  482.             }
  483.             else if (balance >= qty *price){
  484.                 traded();
  485.                 break;
  486.             }
  487.         case 7:
  488.             goodType = 6;
  489.             determineCountry();
  490.             inv = spiceInv;
  491.             price = priceArrays[goodType];
  492.             quantity();
  493.             if (balance < qty *price){
  494.                 lack();
  495.                 break;
  496.             }
  497.             else if (balance >= qty *price){
  498.                 traded();
  499.                 break;
  500.             }
  501.         //potInv = 0, oilInv = 0; fishInv = 0; woolInv=0; velvetInv=0; toolsInv=0; spiceInv=0; ironInv=0; flourInv=0; dyeInv=0; leatherInv=0; furInv=0; beerInv=0, saltInv=0; wineInv=0;
  502.         case 8:
  503.             goodType = 7;
  504.             determineCountry();
  505.             inv = ironInv;
  506.             price = priceArrays[goodType];
  507.             quantity();
  508.             if (balance < qty *price){
  509.                 lack();
  510.                 break;
  511.             }
  512.             else if (balance >= qty *price){
  513.                 traded();
  514.                 break;
  515.             }
  516.         case 9:
  517.             goodType = 8;
  518.             determineCountry();
  519.             inv = flourInv;
  520.             price = priceArrays[goodType];
  521.             quantity();
  522.             if (balance < qty *price){
  523.                 lack();
  524.                 break;
  525.             }
  526.             else if (balance >= qty *price){
  527.                 traded();
  528.                 break;
  529.             }
  530.         case 10:
  531.             goodType = 9;
  532.             determineCountry();
  533.             inv = dyeInv;
  534.             price = priceArrays[goodType];
  535.             quantity();
  536.             if (balance < qty *price){
  537.                 lack();
  538.                 break;
  539.             }
  540.             else if (balance >= qty *price){
  541.                 traded();
  542.                 break;
  543.             }
  544.         case 11:
  545.             goodType = 10;
  546.             determineCountry();
  547.             inv = leatherInv;
  548.             price = priceArrays[goodType];
  549.             quantity();
  550.             if (balance < qty *price){
  551.                 lack();
  552.                 break;
  553.             }
  554.             else if (balance >= qty *price){
  555.                 traded();
  556.                 break;
  557.             }
  558.         case 12:
  559.             goodType = 11;
  560.             determineCountry();
  561.             inv = furInv;
  562.             price = priceArrays[goodType];
  563.             quantity();
  564.             if (balance < qty *price){
  565.                 lack();
  566.                 break;
  567.             }
  568.             else if (balance >= qty *price){
  569.                 traded();
  570.                 break;
  571.             }
  572.         case 13:
  573.             goodType = 12;
  574.             determineCountry();
  575.             inv = beerInv;
  576.             price = priceArrays[goodType];
  577.             quantity();
  578.             if (balance < qty *price){
  579.                 lack();
  580.                 break;
  581.             }
  582.             else if (balance >= qty *price){
  583.                 traded();
  584.                 break;
  585.             }
  586.         case 14:
  587.             goodType = 13;
  588.             determineCountry();
  589.             inv = saltInv;
  590.             price = priceArrays[goodType];
  591.             quantity();
  592.             if (balance < qty *price){
  593.                 lack();
  594.                 break;
  595.             }
  596.             else if (balance >= qty *price){
  597.                 traded();
  598.                 break;
  599.             }
  600.         case 15:
  601.             goodType = 14;
  602.             determineCountry();
  603.             inv = wineInv;
  604.             price = priceArrays[goodType];
  605.             quantity();
  606.             if (balance < qty *price){
  607.                 lack();
  608.                 break;
  609.             }
  610.             else if (balance >= qty *price){
  611.                 traded();
  612.                 break;
  613.             }
  614.         case 16:
  615.             check();
  616.             break;
  617.         case 17:
  618.             notes();
  619.             break;
  620.         case 18:
  621.             trade();
  622.             break;
  623.  
  624.         default:
  625.             cout << "That's an invalid option. Please try again.";
  626.             cout << endl;
  627.     }
  628.     } while (input != "1" || input != "2"|| input != "3"|| input != "4"|| input != "5"|| input != "6"|| input != "7"|| input != "8"|| input != "9"|| input != "10"|| input != "11"|| input != "12"|| input != "13"|| input != "14"|| input != "15"|| input != "16"|| input != "17"|| input != "18");
  629.  
  630. }
  631.  
  632. //traded function
  633. void traded(void){
  634.     cout << setprecision(2) << fixed;
  635.     if (mem3 == 0){ //buy
  636.         balance -= qty * price;
  637.         balance_balance();
  638.         cout << endl;
  639.         cout << "You bought " << tradeGoods[goodType] << "for Eur " << qty * price << ".";
  640.         cout << endl;
  641.         if (goodType==0) potInv+=qty;
  642.         else if (goodType==1) oilInv+=qty;
  643.         else if (goodType==2) fishInv+=qty;
  644.         else if (goodType==3) woolInv+=qty;
  645.         else if (goodType==4) velvetInv+=qty;
  646.         else if (goodType==5) toolsInv+=qty;
  647.         else if (goodType==6) spiceInv+=qty;
  648.         else if (goodType==7) ironInv+=qty;
  649.         else if (goodType==8) flourInv+=qty;
  650.         else if (goodType==9) dyeInv+=qty;
  651.         else if (goodType==10) leatherInv+=qty;
  652.         else if (goodType==11) furInv+=qty;
  653.         else if (goodType==12) beerInv+=qty;
  654.         else if (goodType==13) saltInv+=qty;
  655.         else if (goodType==14) wineInv+=qty;
  656.     }
  657.     else if (mem3 == 1){ //sell
  658.         balance += qty * price;
  659.         balance_balance();
  660.         cout << endl;
  661.         cout << "You sold " << tradeGoods[goodType] << "for Eur " << qty * price << ".";
  662.         cout << endl;
  663.         if (goodType==0) potInv-=qty;
  664.         else if (goodType==1) oilInv-=qty;
  665.         else if (goodType==1) oilInv-=qty;
  666.         else if (goodType==2) fishInv-=qty;
  667.         else if (goodType==3) woolInv-=qty;
  668.         else if (goodType==4) velvetInv-=qty;
  669.         else if (goodType==5) toolsInv-=qty;
  670.         else if (goodType==6) spiceInv-=qty;
  671.         else if (goodType==7) ironInv-=qty;
  672.         else if (goodType==8) flourInv-=qty;
  673.         else if (goodType==9) dyeInv-=qty;
  674.         else if (goodType==10) leatherInv-=qty;
  675.         else if (goodType==11) furInv-=qty;
  676.         else if (goodType==12) beerInv-=qty;
  677.         else if (goodType==13) saltInv-=qty;
  678.         else if (goodType==14) wineInv-=qty;
  679.         cout << endl;
  680.  
  681.     }
  682.     turn++;
  683.     if(turn%20==0)
  684.     {
  685.     potInvSwede*=1.1;
  686.     potInvPol*=1.1;
  687.     potInvRus*=1.1;
  688.     potInvCri*=1.1;
  689.     potInvSau*=1.1;
  690.     potInvUkr*=1.1;
  691.     potInvChi*=1.1;
  692.     oilInvSwede*=1.1;
  693.     oilInvPol*=1.1;
  694.     oilInvRus*=1.1 ;
  695.     oilInvCri*=1.1;
  696.     oilInvSau*=1.1;
  697.     oilInvUkr*=1.1;
  698.     oilInvChi*=1.1;
  699.     fishInvSwede*=1.1;  
  700.     fishInvPol*=1.1;   
  701.     fishInvRus*=1.1;   
  702.     fishInvCri*=1.1;       
  703.     fishInvSau*=1.1;
  704.     fishInvUkr*=1.1;
  705.     fishInvChi*=1.1;
  706.     woolInvSwede*=1.1;     
  707.     woolInvPol*=1.1;    
  708.     woolInvRus*=1.1;   
  709.     woolInvCri*=1.1;   
  710.     woolInvSau*=1.1;   
  711.     woolInvUkr*=1.1;   
  712.     woolInvChi*=1.1;
  713.     velvetInvSwede*=1.1;   
  714.     velvetInvPol*=1.1; 
  715.     velvetInvRus*=1.1; 
  716.     velvetInvCri*=1.1;     
  717.     velvetInvSau*=1.1; 
  718.     velvetInvUkr*=1.1; 
  719.     velvetInvChi*=1.1;
  720.     toolsInvSwede*=1.1;
  721.     toolsInvPol*=1.1;  
  722.     toolsInvRus*=1.1;  
  723.     toolsInvCri*=1.1;      
  724.     toolsInvSau*=1.1;      
  725.     toolsInvUkr*=1.1;  
  726.     toolsInvChi*=1.1;
  727.     spiceInvSwede*=1.1;
  728.     spiceInvPol*=1.1;  
  729.     spiceInvRus*=1.1;  
  730.     spiceInvCri*=1.1;      
  731.     spiceInvSau*=1.1;  
  732.     spiceInvUkr*=1.1;  
  733.     spiceInvChi*=1.1;
  734.     ironInvSwede*=1.1; 
  735.     ironInvPol*=1.1;
  736.     ironInvRus*=1.1;    
  737.     ironInvCri*=1.1;       
  738.     ironInvSau*=1.1;   
  739.     ironInvUkr*=1.1;   
  740.     ironInvChi*=1.1;
  741.     flourInvSwede*=1.1;
  742.     flourInvPol*=1.1;  
  743.     flourInvRus*=1.1;  
  744.     flourInvCri*=1.1;      
  745.     flourInvSau*=1.1;  
  746.     flourInvUkr*=1.1;
  747.     flourInvChi*=1.1;
  748.     dyeInvSwede*=1.1;  
  749.     dyeInvPol*=1.1;
  750.     dyeInvRus*=1.1;    
  751.     dyeInvCri*=1.1;    
  752.     dyeInvSau*=1.1;    
  753.     dyeInvUkr*=1.1;
  754.     dyeInvChi*=1.1;
  755.     leatherInvSwede*=1.1;  
  756.     leatherInvPol*=1.1;
  757.     leatherInvRus*=1.1;
  758.     leatherInvCri*=1.1;
  759.     leatherInvSau*=1.1;
  760.     leatherInvUkr*=1.1;
  761.     leatherInvChi*=1.1;
  762.     furInvSwede*=1.1;      
  763.     furInvPol*=1.1;    
  764.     furInvRus*=1.1;
  765.     furInvCri*=1.1;
  766.     furInvSau*=1.1;    
  767.     furInvUkr*=1.1;
  768.     furInvChi*=1.1;
  769.     beerInvSwede*=1.1;     
  770.     beerInvPol*=1.1;   
  771.     beerInvRus*=1.1;   
  772.     beerInvCri*=1.1;       
  773.     beerInvSau*=1.1;       
  774.     beerInvUkr*=1.1;   
  775.     beerInvChi*=1.1;
  776.     saltInvSwede*=1.1;     
  777.     saltInvPol*=1.1;    
  778.     saltInvRus*=1.1;   
  779.     saltInvCri*=1.1;       
  780.     saltInvSau*=1.1;   
  781.     saltInvUkr*=1.1;   
  782.     saltInvChi*=1.1;
  783.     wineInvSwede*=1.1;     
  784.     wineInvPol*=1.1;    
  785.     wineInvRus*=1.1;
  786.     wineInvCri*=1.1;
  787.     wineInvSau*=1.1;       
  788.     wineInvUkr*=1.1;
  789.     wineInvChi*=1.1;
  790.     }
  791.  
  792.     system("pause");
  793.     loc();
  794. }
  795.  
  796. //quantity function
  797. void quantity(void){
  798.     mem = 4;
  799.     balance_balance();
  800.     if (mem3 == 0){
  801.         cout << "How many " << tradeGoods[goodType] << " do you want to buy? ";
  802.         cin >> qty;
  803.         countryInv();
  804.     }
  805.     else if (mem3 == 1){
  806.         cout << "How many " << tradeGoods[goodType] << " do you want to sell? ";
  807.         cin >> qty;
  808.         countryInv();
  809.     }
  810.     else quantity();
  811. }
  812.  
  813. //lacking function
  814. void lack(void){
  815.     if (mem3 == 0){
  816.         cout << endl;
  817.         cout << "You have insufficient balance ... ";
  818.         cout << endl;
  819.         system("pause");
  820.         buy();
  821.     }
  822.     else if (mem3 == 1){
  823.         cout << endl;
  824.         cout << "You don't have " << qty << " of " << tradeGoods[goodType];
  825.         cout << endl;
  826.         system("pause");
  827.         sell();
  828.     }
  829. }
  830.  
  831. //sell function
  832. void sell(void){
  833.     string input;
  834.     int x;
  835.     mem = 3;
  836.     mem2 = 3;
  837.     mem3 = 1;
  838.     country = "None";
  839.     balance_balance();
  840.     goods();
  841.     cout << "What do you want to sell? ";
  842.     cout << endl;
  843.     do {
  844.     cout << "Enter Input: ";
  845.     cin >> input;
  846.     stringstream(input) >> x;
  847.     switch (x){
  848.        case 1:
  849.             goodType = 0;
  850.             determineCountry();
  851.             inv = potInv;
  852.             price = priceArrays[goodType];
  853.             quantity();
  854.             if (inv < qty){
  855.                 lack();
  856.                 break;
  857.             }
  858.             else if (inv >= qty){
  859.                 traded();
  860.                 break;
  861.             }
  862.         case 2:
  863.             goodType = 1;
  864.             determineCountry();
  865.             inv = oilInv;
  866.             price = priceArrays[goodType];
  867.             quantity();
  868.             if (inv < qty){
  869.                 lack();
  870.                 break;
  871.             }
  872.             else if (inv >= qty){
  873.                 traded();
  874.                 break;
  875.             }
  876.         case 3:
  877.             goodType = 2;
  878.             determineCountry();
  879.             inv = fishInv;
  880.             price = priceArrays[goodType];
  881.             quantity();
  882.             if (inv < qty){
  883.                 lack();
  884.                 break;
  885.             }
  886.             else if (inv >= qty){
  887.                 traded();
  888.                 break;
  889.             }
  890.         case 4:
  891.             goodType = 3;
  892.             determineCountry();
  893.             inv = woolInv;
  894.             price = priceArrays[goodType];
  895.             quantity();
  896.             if (inv < qty){
  897.                 lack();
  898.                 break;
  899.             }
  900.             else if (inv >= qty){
  901.                 traded();
  902.                 break;
  903.             }
  904.         case 5:
  905.             goodType = 4;
  906.             determineCountry();
  907.             inv = velvetInv;
  908.             price = priceArrays[goodType];
  909.             quantity();
  910.             if (inv < qty){
  911.                 lack();
  912.                 break;
  913.             }
  914.             else if (inv >= qty){
  915.                 traded();
  916.                 break;
  917.             }
  918.         case 6:
  919.             goodType = 5;
  920.             determineCountry();
  921.             inv = toolsInv;
  922.             price = priceArrays[goodType];
  923.             quantity();
  924.             if (inv < qty){
  925.                 lack();
  926.                 break;
  927.             }
  928.             else if (inv >= qty){
  929.                 traded();
  930.                 break;
  931.             }
  932.         case 7:
  933.             goodType = 6;
  934.             determineCountry();
  935.             inv = spiceInv;
  936.             price = priceArrays[goodType];
  937.             quantity();
  938.             if (inv < qty){
  939.                 lack();
  940.                 break;
  941.             }
  942.             else if (inv >= qty){
  943.                 traded();
  944.                 break;
  945.             }
  946.         case 8:
  947.             goodType = 7;
  948.             determineCountry();
  949.             inv = ironInv;
  950.             price = priceArrays[goodType];
  951.             quantity();
  952.             if (inv < qty){
  953.                 lack();
  954.                 break;
  955.             }
  956.             else if (inv >= qty){
  957.                 traded();
  958.                 break;
  959.             }
  960.         case 9:
  961.             goodType = 8;
  962.             determineCountry();
  963.             inv = flourInv;
  964.             price = priceArrays[goodType];
  965.             quantity();
  966.             if (inv < qty){
  967.                 lack();
  968.                 break;
  969.             }
  970.             else if (inv >= qty){
  971.                 traded();
  972.                 break;
  973.             }
  974.         case 10:
  975.             goodType = 9;
  976.             determineCountry();
  977.             inv = dyeInv;
  978.             price = priceArrays[goodType];
  979.             quantity();
  980.             if (inv < qty){
  981.                 lack();
  982.                 break;
  983.             }
  984.             else if (inv >= qty){
  985.                 traded();
  986.                 break;
  987.             }
  988.         case 11:
  989.             goodType = 10;
  990.             determineCountry();
  991.             inv = leatherInv;
  992.             price = priceArrays[goodType];
  993.             quantity();
  994.             if (inv < qty){
  995.                 lack();
  996.                 break;
  997.             }
  998.             else if (inv >= qty){
  999.                 traded();
  1000.                 break;
  1001.             }
  1002.         case 12:
  1003.             goodType = 11;
  1004.             determineCountry();
  1005.             inv = furInv;
  1006.             price = priceArrays[goodType];
  1007.             quantity();
  1008.             if (inv < qty){
  1009.                 lack();
  1010.                 break;
  1011.             }
  1012.             else if (inv >= qty){
  1013.                 traded();
  1014.                 break;
  1015.             }
  1016.         case 13:
  1017.             goodType = 12;
  1018.             determineCountry();
  1019.             inv = beerInv;
  1020.             price = priceArrays[goodType];
  1021.             quantity();
  1022.             if (inv < qty){
  1023.                 lack();
  1024.                 break;
  1025.             }
  1026.             else if (inv >= qty){
  1027.                 traded();
  1028.                 break;
  1029.             }
  1030.         case 14:
  1031.             goodType = 13;
  1032.             determineCountry();
  1033.             inv = saltInv;
  1034.             price = priceArrays[goodType];
  1035.             quantity();
  1036.             if (inv < qty){
  1037.                 lack();
  1038.                 break;
  1039.             }
  1040.             else if (inv >= qty){
  1041.                 traded();
  1042.                 break;
  1043.             }
  1044.         case 15:
  1045.             goodType = 14;
  1046.             determineCountry();
  1047.             inv = wineInv;
  1048.             price = priceArrays[goodType];
  1049.             quantity();
  1050.             if (inv < qty){
  1051.                 lack();
  1052.                 break;
  1053.             }
  1054.             else if (inv >= qty){
  1055.                 traded();
  1056.                 break;
  1057.             }
  1058.         case 16:
  1059.             check();
  1060.             break;
  1061.         case 17:
  1062.             notes();
  1063.             break;
  1064.         case 18:
  1065.             trade();
  1066.             break;
  1067.         default:
  1068.             cout << "That's an invalid option. Please try again.";
  1069.         cout << endl;
  1070.     } }while (input != "1" || input != "2"|| input != "3"|| input != "4"|| input != "5"|| input != "6"|| input != "7");
  1071.  
  1072.        
  1073. }
  1074. //notes function
  1075. void notes(void){
  1076.     if (country == "Sweden"){
  1077.         cout << endl;
  1078.         cout << "Sweden's exports and imports are well-met . . . ";
  1079.         cout << endl;
  1080.         //For checking . . .
  1081.         cout << "Sweden's Inventory . . . ";
  1082.         cout << endl;
  1083.         cout << "Pottery: " << potInvSwede;
  1084.         cout << endl;
  1085.         cout << "Oil: " << oilInvSwede;
  1086.         cout << endl;
  1087.         cout << "Fish: " << fishInvSwede;
  1088.         cout << endl;
  1089.         cout << "Wool Cloth:" << woolInvSwede;
  1090.         cout << endl;
  1091.         cout << "Velvet: " << velvetInvSwede;
  1092.         cout << endl;
  1093.         cout << "Tools: " << toolsInvSwede;
  1094.         cout << endl;
  1095.         cout << "Spice: " << spiceInvSwede;
  1096.         cout << endl;
  1097.         cout << "Iron: " << ironInvSwede;
  1098.         cout << endl;
  1099.         cout << "Flour: " << flourInvSwede;
  1100.         cout << endl;
  1101.         cout << "Dyes: " << dyeInvSwede;
  1102.         cout << endl;
  1103.         cout << "Leatherworks: " << leatherInvSwede;
  1104.         cout << endl;
  1105.         cout << "Fur: " << furInvSwede;
  1106.         cout << endl;
  1107.         cout << "Beer: " << beerInvSwede;
  1108.         cout << endl;
  1109.         cout << "Salt: " << saltInvSwede;
  1110.         cout << endl;
  1111.         cout << "Wine: " << wineInvSwede;
  1112.         cout << endl;
  1113.     }
  1114.     else if (country == "Poland"){
  1115.         cout << endl;
  1116.         cout << "Poland's Exports and Imports . . . ";
  1117.         cout << endl;
  1118.         cout << "Exports: Oil, Beer, Flour, Tools";
  1119.         cout << endl;
  1120.         cout << "Imports: Velvet, Iron, Spice, Pottery";
  1121.         cout << endl;
  1122.         // Checking . . .
  1123.         cout << "Poland's Inventory . . . ";
  1124.         cout << endl;
  1125.         cout << "Pottery: " << potInvPol;
  1126.         cout << endl;
  1127.         cout << "Oil: " << oilInvPol;
  1128.         cout << endl;
  1129.         cout << "Fish: " << fishInvPol;
  1130.         cout << endl;
  1131.         cout << "Wool Cloth:" << woolInvPol;
  1132.         cout << endl;
  1133.         cout << "Velvet: " << velvetInvPol;
  1134.         cout << endl;
  1135.         cout << "Tools: " << toolsInvPol;
  1136.         cout << endl;
  1137.         cout << "Spice: " << spiceInvPol;
  1138.         cout << endl;
  1139.         cout << "Iron: " << ironInvPol;
  1140.         cout << endl;
  1141.         cout << "Flour: " << flourInvPol;
  1142.         cout << endl;
  1143.         cout << "Dyes: " << dyeInvPol;
  1144.         cout << endl;
  1145.         cout << "Leatherworks: " << leatherInvPol;
  1146.         cout << endl;
  1147.         cout << "Fur: " << furInvPol;
  1148.         cout << endl;
  1149.         cout << "Beer: " << beerInvPol;
  1150.         cout << endl;
  1151.         cout << "Salt: " << saltInvPol;
  1152.         cout << endl;
  1153.         cout << "Wine: " << wineInvPol;
  1154.         cout << endl;
  1155.     }
  1156.     else if (country == "Russia"){
  1157.         cout << endl;
  1158.         cout << "Russia's Exports and Imports . . . ";
  1159.         cout << endl;
  1160.         cout << "Exports: Furs, Dyes, Spice, Wool";
  1161.         cout << endl;
  1162.         cout << "Imports: Oil, Fish, Salt, Velvet, Flour, Pottery, Beer, Tools, Iron, Leatherworks";
  1163.         cout << endl;
  1164.         // Checking . . .
  1165.         cout << "Russia's Inventory . . . ";
  1166.         cout << endl;
  1167.         cout << "Pottery: " << potInvRus;
  1168.         cout << endl;
  1169.         cout << "Oil: " << oilInvRus;
  1170.         cout << endl;
  1171.         cout << "Fish: " << fishInvRus;
  1172.         cout << endl;
  1173.         cout << "Wool Cloth:" << woolInvRus;
  1174.         cout << endl;
  1175.         cout << "Velvet: " << velvetInvRus;
  1176.         cout << endl;
  1177.         cout << "Tools: " << toolsInvRus;
  1178.         cout << endl;
  1179.         cout << "Spice: " << spiceInvRus;
  1180.         cout << endl;
  1181.         cout << "Iron: " << ironInvRus;
  1182.         cout << endl;
  1183.         cout << "Flour: " << flourInvRus;
  1184.         cout << endl;
  1185.         cout << "Dyes: " << dyeInvRus;
  1186.         cout << endl;
  1187.         cout << "Leatherworks: " << leatherInvRus;
  1188.         cout << endl;
  1189.         cout << "Fur: " << furInvRus;
  1190.         cout << endl;
  1191.         cout << "Beer: " << beerInvRus;
  1192.         cout << endl;
  1193.         cout << "Salt: " << saltInvRus;
  1194.         cout << endl;
  1195.         cout << "Wine: " << wineInvRus;
  1196.         cout << endl;
  1197.     }
  1198.     else if (country == "Crimea"){
  1199.         cout << endl;
  1200.         cout << "Crimea's Exports and Imports . . . ";
  1201.         cout << endl;
  1202.         cout << "Exports: Leatherworks, Salt, Wine";
  1203.         cout << endl;
  1204.         cout << "Imports: Iron, Oil, Beer";
  1205.         cout << endl;
  1206.         // Checking . . .
  1207.         cout << "Crimea's Inventory . . . ";
  1208.         cout << endl;
  1209.         cout << "Pottery: " << potInvCri;
  1210.         cout << endl;
  1211.         cout << "Oil: " << oilInvCri;
  1212.         cout << endl;
  1213.         cout << "Fish: " << fishInvCri;
  1214.         cout << endl;
  1215.         cout << "Wool Cloth:" << woolInvCri;
  1216.         cout << endl;
  1217.         cout << "Velvet: " << velvetInvCri;
  1218.         cout << endl;
  1219.         cout << "Tools: " << toolsInvCri;
  1220.         cout << endl;
  1221.         cout << "Spice: " << spiceInvCri;
  1222.         cout << endl;
  1223.         cout << "Iron: " << ironInvCri;
  1224.         cout << endl;
  1225.         cout << "Flour: " << flourInvCri;
  1226.         cout << endl;
  1227.         cout << "Dyes: " << dyeInvCri;
  1228.         cout << endl;
  1229.         cout << "Leatherworks: " << leatherInvCri;
  1230.         cout << endl;
  1231.         cout << "Fur: " << furInvCri;
  1232.         cout << endl;
  1233.         cout << "Beer: " << beerInvCri;
  1234.         cout << endl;
  1235.         cout << "Salt: " << saltInvCri;
  1236.         cout << endl;
  1237.         cout << "Wine: " << wineInvCri;
  1238.         cout << endl;
  1239.     }
  1240.     else if (country == "Saudi"){
  1241.         cout << endl;
  1242.         cout << "Saudi Arabia's Exports and Imports . . . ";
  1243.         cout << endl;
  1244.         cout << "Exports: Salt, Pottery, Velvet";
  1245.         cout << endl;
  1246.         cout << "Imports: Flour, Beer, Fish";
  1247.         cout << endl;
  1248.         // Checking . . .
  1249.         cout << "Pottery: " << potInvSau;
  1250.         cout << endl;
  1251.         cout << "Oil: " << oilInvSau;
  1252.         cout << endl;
  1253.         cout << "Fish: " << fishInvSau;
  1254.         cout << endl;
  1255.         cout << "Wool Cloth:" << woolInvSau;
  1256.         cout << endl;
  1257.         cout << "Velvet: " << velvetInvSau;
  1258.         cout << endl;
  1259.         cout << "Tools: " << toolsInvSau;
  1260.         cout << endl;
  1261.         cout << "Spice: " << spiceInvSau;
  1262.         cout << endl;
  1263.         cout << "Iron: " << ironInvSau;
  1264.         cout << endl;
  1265.         cout << "Flour: " << flourInvSau;
  1266.         cout << endl;
  1267.         cout << "Dyes: " << dyeInvSau;
  1268.         cout << endl;
  1269.         cout << "Leatherworks: " << leatherInvSau;
  1270.         cout << endl;
  1271.         cout << "Fur: " << furInvSau;
  1272.         cout << endl;
  1273.         cout << "Beer: " << beerInvSau;
  1274.         cout << endl;
  1275.         cout << "Salt: " << saltInvSau;
  1276.         cout << endl;
  1277.         cout << "Wine: " << wineInvSau;
  1278.         cout << endl;
  1279.     }
  1280.     else if (country == "Ukraine"){
  1281.         cout << endl;
  1282.         cout << "Ukraine's exports and imports are slightly well-met . . . ";
  1283.         cout << endl;
  1284.         //For checking . . .
  1285.         cout << "Ukraine's Inventory . . . ";
  1286.         cout << endl;
  1287.         cout << "Pottery: " << potInvUkr;
  1288.         cout << endl;
  1289.         cout << "Oil: " << oilInvUkr;
  1290.         cout << endl;
  1291.         cout << "Fish: " << fishInvUkr;
  1292.         cout << endl;
  1293.         cout << "Wool Cloth:" << woolInvUkr;
  1294.         cout << endl;
  1295.         cout << "Velvet: " << velvetInvUkr;
  1296.         cout << endl;
  1297.         cout << "Tools: " << toolsInvUkr;
  1298.         cout << endl;
  1299.         cout << "Spice: " << spiceInvUkr;
  1300.         cout << endl;
  1301.         cout << "Iron: " << ironInvUkr;
  1302.         cout << endl;
  1303.         cout << "Flour: " << flourInvUkr;
  1304.         cout << endl;
  1305.         cout << "Dyes: " << dyeInvUkr;
  1306.         cout << endl;
  1307.         cout << "Leatherworks: " << leatherInvUkr;
  1308.         cout << endl;
  1309.         cout << "Fur: " << furInvUkr;
  1310.         cout << endl;
  1311.         cout << "Beer: " << beerInvUkr;
  1312.         cout << endl;
  1313.         cout << "Salt: " << saltInvUkr;
  1314.         cout << endl;
  1315.         cout << "Wine: " << wineInvUkr;
  1316.         cout << endl;
  1317.     }
  1318.     else if (country == "China"){
  1319.         cout << endl;
  1320.         cout << "China's exports and imports are well-met . . . ";
  1321.         cout << endl;
  1322.         //For checking . . .
  1323.         cout << "China's Inventory . . . ";
  1324.         cout << endl;
  1325.         cout << "Pottery: " << potInvChi;
  1326.         cout << endl;
  1327.         cout << "Oil: " << oilInvChi;
  1328.         cout << endl;
  1329.         cout << "Fish: " << fishInvChi;
  1330.         cout << endl;
  1331.         cout << "Wool Cloth:" << woolInvChi;
  1332.         cout << endl;
  1333.         cout << "Velvet: " << velvetInvChi;
  1334.         cout << endl;
  1335.         cout << "Tools: " << toolsInvChi;
  1336.         cout << endl;
  1337.         cout << "Spice: " << spiceInvChi;
  1338.         cout << endl;
  1339.         cout << "Iron: " << ironInvChi;
  1340.         cout << endl;
  1341.         cout << "Flour: " << flourInvChi;
  1342.         cout << endl;
  1343.         cout << "Dyes: " << dyeInvChi;
  1344.         cout << endl;
  1345.         cout << "Leatherworks: " << leatherInvChi;
  1346.         cout << endl;
  1347.         cout << "Fur: " << furInvChi;
  1348.         cout << endl;
  1349.         cout << "Beer: " << beerInvChi;
  1350.         cout << endl;
  1351.         cout << "Salt: " << saltInvChi;
  1352.         cout << endl;
  1353.         cout << "Wine: " << wineInvChi;
  1354.         cout << endl;
  1355.     }
  1356.  
  1357.    
  1358.     else if (country == "None"){
  1359.         cout << "Input country notes: ";
  1360.         cin >> country;
  1361.         notes();
  1362.     }
  1363.     else{
  1364.         cout << "Input country notes: ";
  1365.                 cin >> country;
  1366.                 notes();
  1367.     }
  1368.     system("pause");
  1369.     if (mem2 == 1) trade();
  1370.     else if (mem2 == 2) buy();
  1371.     else if (mem2 == 3) sell();
  1372.     else if (mem2 == 4) quantity();
  1373.     else if (mem2 == 5) todo2();
  1374. }
  1375.  
  1376. //balance function
  1377. void balance_balance(void){
  1378.     cout << endl;
  1379.     cout << setprecision(2) << fixed;
  1380.     cout << "Balance: Eur " << balance;
  1381.     cout << endl;
  1382. }
  1383.  
  1384. //todo function
  1385. void todo(void){
  1386.     if (land == 0){
  1387.         cout << endl;
  1388.         cout << "You are now trading with Sweden ... ";
  1389.         cout << endl;
  1390.         todo2();
  1391.     }
  1392.     else if (land == 1){
  1393.         cout << endl;
  1394.         cout << "You are now trading with Poland ... ";
  1395.         cout << endl;
  1396.         todo2();
  1397.     }
  1398.       else if (land == 2){
  1399.         cout << endl;
  1400.         cout << "You are now trading with Russia ... ";
  1401.         cout << endl;
  1402.         todo2();
  1403.     }
  1404.     else if (land == 3){
  1405.         cout << endl;
  1406.         cout << "You are now trading with Crimea . . . ";
  1407.         cout << endl;
  1408.         todo2();
  1409.     }
  1410.     else if (land == 4){
  1411.         cout << endl;
  1412.         cout << "You are now trading with Saudi Arabia . . . ";
  1413.         cout << endl;
  1414.         todo2();
  1415.     }
  1416.     else if (land == 5){
  1417.         cout << endl;
  1418.         cout << "You are now trading with Ukraine . . . ";
  1419.         cout << endl;
  1420.         todo2();
  1421.     }
  1422.     else if (land == 6){
  1423.         cout << endl;
  1424.         cout << "You are now trading with China . . . ";
  1425.         cout << endl;
  1426.         todo2();
  1427.     }
  1428.  
  1429. }
  1430.  
  1431. //todo2 function
  1432. void todo2(void){
  1433.     int x;
  1434.     country = "None";
  1435.     mem = 4;
  1436.     mem2 = 5;
  1437.     cout << endl;
  1438.     cout << "[1] Buy";
  1439.     cout << endl;
  1440.     cout << "[2] Sell";
  1441.     cout << endl;
  1442.     cout << "[3] Check inventory";
  1443.     cout << endl;
  1444.     cout << "[4] Check notes";
  1445.     cout << endl;
  1446.     cout << "[5] Return";
  1447.     cout << endl;
  1448.     string input;
  1449.     do {
  1450.     cout << "Enter Input: ";
  1451.     cin >> input;
  1452.     stringstream(input) >> x;
  1453.     switch (x){
  1454.         case 1:
  1455.             buy();
  1456.             break;
  1457.         case 2:
  1458.             sell();
  1459.             break;
  1460.         case 3:
  1461.             check();
  1462.             break;
  1463.         case 4:
  1464.             notes();
  1465.             break;
  1466.         case 5:
  1467.             trade();
  1468.             break;
  1469.         default:
  1470.             cout << "That's an invalid option. Please try again.";
  1471.             cout << endl;
  1472.     }
  1473.     } while (input != "1" || input != "2"|| input != "3"|| input != "4"|| input != "5"|| input != "6"|| input != "7"|| input != "8"|| input != "9"|| input != "10"|| input != "11"|| input != "12"|| input != "13"|| input != "14"|| input != "15"|| input != "16"|| input != "17"|| input != "18"|| input != "19");
  1474.  
  1475.  
  1476. }
  1477. //country inventory
  1478. void countryInv(void){
  1479.     if (land==0){
  1480.         //Buy
  1481.         //Buying pot
  1482.         if (goodType==0 && mem3==0){
  1483.             if (qty>potInvSwede){
  1484.                 cout << "Sweden does not have " << qty << " pottery.";
  1485.                 quantity();
  1486.             }
  1487.             else potInvSwede -= qty;
  1488.         }
  1489.         //Buying oil
  1490.         else if (goodType==1 && mem3==0){
  1491.             if (qty>oilInvSwede){
  1492.                 cout << "Sweden does not have " << qty << " oil.";
  1493.                 quantity();
  1494.             }
  1495.             else oilInvSwede -= qty;
  1496.         }
  1497.         //Sell
  1498.         //Selling pot
  1499.         if (goodType==0 && mem3==1){
  1500.             potInvSwede += qty;
  1501.         }
  1502.         //Selling oil
  1503.         else if (goodType==1 && mem3==1){
  1504.             oilInvSwede += qty;
  1505.         }
  1506.     }
  1507.     else if (land==1){
  1508.         //Buy
  1509.         if (goodType==0 && mem3==0){
  1510.             if (qty>potInvPol){
  1511.                 cout << "Poland does not have " << qty << " pottery.";
  1512.                 quantity();
  1513.             }
  1514.             else potInvPol -= qty;
  1515.         }
  1516.         else if (goodType==1 && mem3==0){
  1517.             if (qty>potInvPol){
  1518.                 cout << "Poland does not have " << qty << " oil.";
  1519.                 quantity();
  1520.             }
  1521.             oilInvPol -= qty;
  1522.         }
  1523.         //Sell
  1524.         else if (goodType==0 && mem3==1){
  1525.             potInvPol += qty;
  1526.         }
  1527.         else if (goodType== 1 && mem3==1){
  1528.             oilInvPol += qty;
  1529.         }
  1530.     }
  1531.             else if (land==2){
  1532.         //Buy
  1533.         if (goodType==0 && mem3==0){
  1534.             if (qty>potInvRus){
  1535.                 cout << "Russia does not have " << qty << " pottery.";
  1536.                 quantity();
  1537.             }
  1538.             else potInvRus -= qty;
  1539.         }
  1540.         else if (goodType==1 && mem3==0){
  1541.             if (qty>potInvRus){
  1542.                 cout << "Russia does not have " << qty << " oil.";
  1543.                 quantity();
  1544.             }
  1545.             oilInvRus -= qty;
  1546.         }
  1547.         //Sell
  1548.         else if (goodType==0 && mem3==1){
  1549.             potInvRus += qty;
  1550.         }
  1551.         else if (goodType==1 && mem3==1){
  1552.             oilInvRus += qty;
  1553.         }
  1554.     }
  1555.    else if (land==3){
  1556.         //Buy
  1557.         if (goodType==0 && mem3==0){
  1558.             if (qty>potInvCri){
  1559.                 cout << "Crimea does not have " << qty << " pottery.";
  1560.                 quantity();
  1561.             }
  1562.             else potInvCri -= qty;
  1563.         }
  1564.         else if (goodType==1 && mem3==0){
  1565.             if (qty>potInvCri){
  1566.                 cout << "Crimea does not have " << qty << " oil.";
  1567.                 quantity();
  1568.             }
  1569.             oilInvCri -= qty;
  1570.         }
  1571.         //Sell
  1572.         else if (goodType==0 && mem3==1){
  1573.             potInvCri += qty;
  1574.         }
  1575.         else if (goodType==1 && mem3==1){
  1576.             oilInvCri += qty;
  1577.         }
  1578.     }
  1579.     else if (land==4){
  1580.         //Buy
  1581.         if (goodType==0 && mem3==0){
  1582.             if (qty>potInvSau){
  1583.                 cout << "Saudi Arabia does not have " << qty << " pottery.";
  1584.                 quantity();
  1585.             }
  1586.             else potInvSau -= qty;
  1587.         }
  1588.         else if (goodType==1 && mem3==0){
  1589.             if (qty>potInvSau){
  1590.                 cout << "Saudi Arabia does not have " << qty << " oil.";
  1591.                 quantity();
  1592.             }
  1593.             oilInvSau -= qty;
  1594.         }
  1595.         //Sell
  1596.         else if (goodType==0 && mem3==1){
  1597.             potInvSau += qty;
  1598.         }
  1599.         else if (goodType==1 && mem3==1){
  1600.             oilInvSau += qty;
  1601.         }
  1602.     }
  1603.     else if (land==5){
  1604.         //Buy
  1605.         if (goodType==0 && mem3==0){
  1606.             if (qty>potInvUkr){
  1607.                 cout << "Ukraine does not have " << qty << " pottery.";
  1608.                 quantity();
  1609.             }
  1610.             else potInvUkr -= qty;
  1611.         }
  1612.         else if (goodType==1 && mem3==0){
  1613.             if (qty>potInvUkr){
  1614.                 cout << "Ukraine does not have " << qty << " oil.";
  1615.                 quantity();
  1616.             }
  1617.             oilInvUkr -= qty;
  1618.         }
  1619.         //Sell
  1620.         else if (goodType==0 && mem3==1){
  1621.             potInvUkr += qty;
  1622.         }
  1623.         else if (goodType==1 && mem3==1){
  1624.             oilInvUkr += qty;
  1625.         }
  1626.     }
  1627.     else if (land==6){
  1628.         //Buy
  1629.         if (goodType==0 && mem3==0){
  1630.             if (qty>potInvChi){
  1631.                 cout << "China does not have " << qty << " pottery.";
  1632.                 quantity();
  1633.             }
  1634.             else potInvChi -= qty;
  1635.         }
  1636.         else if (goodType==1 && mem3==0){
  1637.             if (qty>potInvChi){
  1638.                 cout << "China does not have " << qty << " oil.";
  1639.                 quantity();
  1640.             }
  1641.             oilInvChi -= qty;
  1642.         }
  1643.         //Sell
  1644.         else if (goodType==0 && mem3==1){
  1645.             potInvChi += qty;
  1646.         }
  1647.         else if (goodType==1 && mem3==1){
  1648.             oilInvChi += qty;
  1649.         }
  1650.     }
  1651.  
  1652. }
  1653.  
  1654.  
  1655. //random function
  1656. void random(void){
  1657.     goodType = 0;
  1658.     for (int i = 1; i <= 15; i++){
  1659.         if (goodType == 0){
  1660.             if (land == 0){
  1661.                 inv_Country = potInvSwede;
  1662.             }
  1663.             else if (land == 1){
  1664.                 inv_Country = potInvPol;
  1665.             }
  1666.             else if (land == 2){
  1667.                 inv_Country = potInvRus;
  1668.             }
  1669.             //changes
  1670.             else if (land == 3){
  1671.                 inv_Country = potInvCri;
  1672.             }
  1673.             else if (land == 4){
  1674.                 inv_Country = potInvSau;
  1675.             }
  1676.             else if (land == 5){
  1677.                 inv_Country = potInvUkr;
  1678.             }
  1679.             else if (land == 6){
  1680.                 inv_Country = potInvChi;
  1681.             }
  1682.            
  1683.             if (inv_Country >= 76 && inv_Country <= 100){
  1684.                 price = potPrice[land] + randomnum * 1;
  1685.             }
  1686.             else if (inv_Country >= 51 && inv_Country <= 75){
  1687.                 price = potPrice[land] * 1.25 + randomnum;
  1688.             }
  1689.             else if (inv_Country >= 26 && inv_Country <= 50){
  1690.                 price = potPrice[land] * 1.50 + randomnum;
  1691.             }
  1692.             else if (inv_Country <= 25){
  1693.                 price = potPrice[land] * 2 + randomnum;
  1694.             }
  1695.             else if (inv_Country > 100){
  1696.                 price = potPrice[land] * 0.5 + randomnum;
  1697.             }
  1698.             priceArrays[0] = price;
  1699.         }
  1700.         else if (goodType == 1){
  1701.             if (land == 0){
  1702.                 inv_Country = oilInvSwede;  
  1703.             }
  1704.             else if (land == 1){
  1705.                 inv_Country = oilInvPol;    
  1706.             }
  1707.             else if (land == 2){
  1708.                 inv_Country = oilInvRus;
  1709.             }
  1710.             //changes
  1711.             else if (land == 3){
  1712.                 inv_Country = oilInvCri;
  1713.             }
  1714.             else if (land == 4){
  1715.                 inv_Country = oilInvSau;
  1716.             }
  1717.             else if (land == 5){
  1718.                 inv_Country = oilInvUkr;
  1719.             }
  1720.             else if (land == 6){
  1721.                 inv_Country = oilInvChi;
  1722.             }
  1723.            
  1724.             if (inv_Country >= 38 && inv_Country <= 50){
  1725.                 price = oilPrice[land] + randomnum;
  1726.             }
  1727.             else if (inv_Country >= 26 && inv_Country <= 37){
  1728.                 price = oilPrice[land] * 1.25 + randomnum;
  1729.             }
  1730.             else if (inv_Country >= 13 && inv_Country <= 25){
  1731.                 price = oilPrice[land] * 1.50 + randomnum;
  1732.             }
  1733.             else if (inv_Country <= 12){
  1734.                 price = oilPrice[land] * 2 + randomnum;
  1735.             }
  1736.             else if (inv_Country > 50){
  1737.                 price = oilPrice[land] * 0.75 + randomnum;
  1738.             }
  1739.             priceArrays[1] = price;
  1740.         }
  1741.         else if (goodType == 2){
  1742.             if (land == 0){
  1743.                 inv_Country = fishInvSwede;  
  1744.             }
  1745.             else if (land == 1){
  1746.                 inv_Country = fishInvPol;    
  1747.             }
  1748.             else if (land == 2){
  1749.                 inv_Country = fishInvRus;
  1750.             }
  1751.             //changes
  1752.             else if (land == 3){
  1753.                 inv_Country = fishInvCri;
  1754.             }
  1755.             else if (land == 4){
  1756.                 inv_Country = fishInvSau;
  1757.             }
  1758.             else if (land == 5){
  1759.                 inv_Country = fishInvUkr;
  1760.             }
  1761.             else if (land == 6){
  1762.                 inv_Country = fishInvChi;
  1763.             }
  1764.            
  1765.             if (inv_Country >= 114 && inv_Country <= 150){
  1766.                 price = fishPrice[land] + randomnum;
  1767.             }
  1768.             else if (inv_Country >= 76 && inv_Country <= 113){
  1769.                 price = fishPrice[land] * 1.25 + randomnum;
  1770.             }
  1771.             else if (inv_Country >= 39 && inv_Country <= 75){
  1772.                 price = fishPrice[land] * 1.50 + randomnum;
  1773.             }
  1774.             else if (inv_Country <= 38){
  1775.                 price = fishPrice[land] * 2 + randomnum;
  1776.             }
  1777.             else if (inv_Country > 150){
  1778.                 price = fishPrice[land] * 0.75 + randomnum;
  1779.             }
  1780.             priceArrays[2] = price;
  1781.         }
  1782.         else if (goodType == 3){
  1783.             if (land == 0){
  1784.                 inv_Country = woolInvSwede;  
  1785.             }
  1786.             else if (land == 1){
  1787.                 inv_Country = woolInvPol;    
  1788.             }
  1789.             else if (land == 2){
  1790.                 inv_Country = woolInvRus;
  1791.             }
  1792.             //changes
  1793.             else if (land == 3){
  1794.                 inv_Country = woolInvCri;
  1795.             }
  1796.             else if (land == 4){
  1797.                 inv_Country = woolInvSau;
  1798.             }
  1799.             else if (land == 5){
  1800.                 inv_Country = woolInvUkr;
  1801.             }
  1802.             else if (land == 6){
  1803.                 inv_Country = woolInvChi;
  1804.             }
  1805.            
  1806.             if (inv_Country >= 38 && inv_Country <= 75){
  1807.                 price = woolPrice[land] + randomnum;
  1808.             }
  1809.             else if (inv_Country >= 26 && inv_Country <= 56){
  1810.                 price = woolPrice[land] * 1.25 + randomnum;
  1811.             }
  1812.             else if (inv_Country >= 13 && inv_Country <= 38){
  1813.                 price = woolPrice[land] * 1.50 + randomnum;
  1814.             }
  1815.             else if (inv_Country <= 12){
  1816.                 price = woolPrice[land] * 2 + randomnum;
  1817.             }
  1818.             else if (inv_Country < 75){
  1819.                 price = woolPrice[land] * 0.75 + randomnum;
  1820.             }
  1821.             priceArrays[3] = price;
  1822.         }
  1823.         else if (goodType == 4){
  1824.             if (land == 0){
  1825.                 inv_Country = velvetInvSwede;  
  1826.             }
  1827.             else if (land == 1){
  1828.                 inv_Country = velvetInvPol;    
  1829.             }
  1830.             else if (land == 2){
  1831.                 inv_Country = velvetInvRus;
  1832.             }
  1833.             //changes
  1834.             else if (land == 3){
  1835.                 inv_Country = velvetInvCri;
  1836.             }
  1837.             else if (land == 4){
  1838.                 inv_Country = velvetInvSau;
  1839.             }
  1840.             else if (land == 5){
  1841.                 inv_Country = velvetInvUkr;
  1842.             }
  1843.             else if (land == 6){
  1844.                 inv_Country = velvetInvChi;
  1845.             }
  1846.            
  1847.             if (inv_Country >= 20 && inv_Country <= 25){
  1848.                 price = velvetPrice[land] + randomnum;
  1849.             }
  1850.             else if (inv_Country >= 14 && inv_Country <= 19){
  1851.                 price = velvetPrice[land] * 1.25 + randomnum;
  1852.             }
  1853.             else if (inv_Country >= 8 && inv_Country <= 13){
  1854.                 price = velvetPrice[land] * 1.50 + randomnum;
  1855.             }
  1856.             else if (inv_Country <= 7){
  1857.                 price = velvetPrice[land] * 2 + randomnum;
  1858.             }
  1859.             else if (inv_Country > 25){
  1860.                 price = velvetPrice[land] * 0.75 + randomnum;
  1861.             }
  1862.             priceArrays[4] = price;
  1863.         }
  1864.         else if (goodType == 5){
  1865.             if (land == 0){
  1866.                 inv_Country = toolsInvSwede;  
  1867.             }
  1868.             else if (land == 1){
  1869.                 inv_Country = toolsInvPol;    
  1870.             }
  1871.             else if (land == 2){
  1872.                 inv_Country = toolsInvRus;
  1873.             }
  1874.             //changes
  1875.             else if (land == 3){
  1876.                 inv_Country = toolsInvCri;
  1877.             }
  1878.             else if (land == 4){
  1879.                 inv_Country = toolsInvSau;
  1880.             }
  1881.             else if (land == 5){
  1882.                 inv_Country = toolsInvUkr;
  1883.             }
  1884.             else if (land == 6){
  1885.                 inv_Country = toolsInvChi;
  1886.             }
  1887.            
  1888.             if (inv_Country >= 38 && inv_Country <= 50){
  1889.                 price = toolsPrice[land] + randomnum;
  1890.             }
  1891.             else if (inv_Country >= 26 && inv_Country <= 37){
  1892.                 price = toolsPrice[land] * 1.25 + randomnum;
  1893.             }
  1894.             else if (inv_Country >= 13 && inv_Country <= 25){
  1895.                 price = toolsPrice[land] * 1.50 + randomnum;
  1896.             }
  1897.             else if (inv_Country <= 12){
  1898.                 price = toolsPrice[land] * 2 + randomnum;
  1899.             }
  1900.             else if (inv_Country > 50){
  1901.                 price = toolsPrice[land] * 0.75 + randomnum;
  1902.             }
  1903.             priceArrays[5] = price;
  1904.         }
  1905.         else if (goodType == 6){
  1906.             if (land == 0){
  1907.                 inv_Country = spiceInvSwede;  
  1908.             }
  1909.             else if (land == 1){
  1910.                 inv_Country = spiceInvPol;    
  1911.             }
  1912.             else if (land == 2){
  1913.                 inv_Country = spiceInvRus;
  1914.             }
  1915.             //changes
  1916.             else if (land == 3){
  1917.                 inv_Country = spiceInvCri;
  1918.             }
  1919.             else if (land == 4){
  1920.                 inv_Country = spiceInvSau;
  1921.             }
  1922.             else if (land == 5){
  1923.                 inv_Country = spiceInvUkr;
  1924.             }
  1925.             else if (land == 6){
  1926.                 inv_Country = spiceInvChi;
  1927.             }
  1928.            
  1929.             if (inv_Country >= 24 && inv_Country <= 30){
  1930.                 price = spicePrice[land] + randomnum;
  1931.             }
  1932.             else if (inv_Country >= 16 && inv_Country <= 23){
  1933.                 price = spicePrice[land] * 1.25 + randomnum;
  1934.             }
  1935.             else if (inv_Country >= 9 && inv_Country <= 15){
  1936.                 price = spicePrice[land] * 1.50 + randomnum;
  1937.             }
  1938.             else if (inv_Country <= 8){
  1939.                 price = spicePrice[land] * 2 + randomnum;
  1940.             }
  1941.             else if (inv_Country > 30){
  1942.                 price = spicePrice[land] * 0.75 + randomnum;
  1943.             }
  1944.             priceArrays[6] = price;
  1945.         }
  1946.         else if (goodType == 7){
  1947.             if (land == 0){
  1948.                 inv_Country = ironInvSwede;  
  1949.             }
  1950.             else if (land == 1){
  1951.                 inv_Country = ironInvPol;    
  1952.             }
  1953.             else if (land == 2){
  1954.                 inv_Country = ironInvRus;
  1955.             }
  1956.             //changes
  1957.             else if (land == 3){
  1958.                 inv_Country = ironInvCri;
  1959.             }
  1960.             else if (land == 4){
  1961.                 inv_Country = ironInvSau;
  1962.             }
  1963.             else if (land == 5){
  1964.                 inv_Country = ironInvUkr;
  1965.             }
  1966.             else if (land == 6){
  1967.                 inv_Country = ironInvChi;
  1968.             }
  1969.            
  1970.             if (inv_Country >= 76 && inv_Country <= 100){
  1971.                 price = ironPrice[land] + randomnum;
  1972.             }
  1973.             else if (inv_Country >= 51 && inv_Country <= 75){
  1974.                 price = ironPrice[land] * 1.25 + randomnum;
  1975.             }
  1976.             else if (inv_Country >= 26 && inv_Country <= 50){
  1977.                 price = ironPrice[land] * 1.50 + randomnum;
  1978.             }
  1979.             else if (inv_Country <= 25){
  1980.                 price = ironPrice[land] * 2 + randomnum;
  1981.             }
  1982.             else if (inv_Country > 100){
  1983.                 price = ironPrice[land] * 0.75 + randomnum;
  1984.             }
  1985.             priceArrays[7] = price;
  1986.         }
  1987.         else if (goodType == 8){
  1988.             if (land == 0){
  1989.                 inv_Country = flourInvSwede;  
  1990.             }
  1991.             else if (land == 1){
  1992.                 inv_Country = flourInvPol;    
  1993.             }
  1994.             else if (land == 2){
  1995.                 inv_Country = flourInvRus;
  1996.             }
  1997.             //changes
  1998.             else if (land == 3){
  1999.                 inv_Country = flourInvCri;
  2000.             }
  2001.             else if (land == 4){
  2002.                 inv_Country = flourInvSau;
  2003.             }
  2004.             else if (land == 5){
  2005.                 inv_Country = flourInvUkr;
  2006.             }
  2007.             else if (land == 6){
  2008.                 inv_Country = flourInvChi;
  2009.             }
  2010.            
  2011.             if (inv_Country >= 114 && inv_Country <= 150){
  2012.                 price = flourPrice[land] + randomnum;
  2013.             }
  2014.             else if (inv_Country >= 76 && inv_Country <= 113){
  2015.                 price = flourPrice[land] * 1.25 + randomnum;
  2016.             }
  2017.             else if (inv_Country >= 39 && inv_Country <= 75){
  2018.                 price = flourPrice[land] * 1.50 + randomnum;
  2019.             }
  2020.             else if (inv_Country <= 38){
  2021.                 price = flourPrice[land] * 2 + randomnum;
  2022.             }
  2023.             else if (inv_Country > 150){
  2024.                 price = flourPrice[land] * 0.75 + randomnum;
  2025.             }
  2026.             priceArrays[8] = price;
  2027.         }
  2028.         else if (goodType == 9){
  2029.             if (land == 0){
  2030.                 inv_Country = dyeInvSwede;  
  2031.             }
  2032.             else if (land == 1){
  2033.                 inv_Country = dyeInvPol;    
  2034.             }
  2035.             else if (land == 2){
  2036.                 inv_Country = dyeInvRus;
  2037.             }
  2038.             //changes
  2039.             else if (land == 3){
  2040.                 inv_Country = dyeInvCri;
  2041.             }
  2042.             else if (land == 4){
  2043.                 inv_Country = dyeInvSau;
  2044.             }
  2045.             else if (land == 5){
  2046.                 inv_Country = dyeInvUkr;
  2047.             }
  2048.             else if (land == 6){
  2049.                 inv_Country = dyeInvChi;
  2050.             }
  2051.            
  2052.             if (inv_Country >= 57 && inv_Country <= 75){
  2053.                 price = dyePrice[land] + randomnum;
  2054.             }
  2055.             else if (inv_Country >= 40 && inv_Country <= 56){
  2056.                 price = dyePrice[land] * 1.25 + randomnum;
  2057.             }
  2058.             else if (inv_Country >= 20 && inv_Country <= 39){
  2059.                 price = dyePrice[land] * 1.50 + randomnum;
  2060.             }
  2061.             else if (inv_Country <= 19){
  2062.                 price = dyePrice[land] * 2 + randomnum;
  2063.             }
  2064.             else if (inv_Country > 75){
  2065.                 price = dyePrice[land] * 0.75 + randomnum;
  2066.             }
  2067.             priceArrays[9] = price;
  2068.         }
  2069.         else if (goodType == 10){
  2070.             if (land == 0){
  2071.                 inv_Country = leatherInvSwede;  
  2072.             }
  2073.             else if (land == 1){
  2074.                 inv_Country = leatherInvPol;    
  2075.             }
  2076.             else if (land == 2){
  2077.                 inv_Country = leatherInvRus;
  2078.             }
  2079.             //changes
  2080.             else if (land == 3){
  2081.                 inv_Country = leatherInvCri;
  2082.             }
  2083.             else if (land == 4){
  2084.                 inv_Country = leatherInvSau;
  2085.             }
  2086.             else if (land == 5){
  2087.                 inv_Country = leatherInvUkr;
  2088.             }
  2089.             else if (land == 6){
  2090.                 inv_Country = leatherInvChi;
  2091.             }
  2092.            
  2093.             if (inv_Country >= 57 && inv_Country <= 75){
  2094.                 price = leatherPrice[land] + randomnum;
  2095.             }
  2096.             else if (inv_Country >= 39 && inv_Country <= 56){
  2097.                 price = leatherPrice[land] * 1.25 + randomnum;
  2098.             }
  2099.             else if (inv_Country >= 20 && inv_Country <= 38){
  2100.                 price = leatherPrice[land] * 1.50 + randomnum;
  2101.             }
  2102.             else if (inv_Country <= 19){
  2103.                 price = leatherPrice[land] * 2 + randomnum;
  2104.             }
  2105.             else if (inv_Country > 75){
  2106.                 price = leatherPrice[land] * 0.75 + randomnum;
  2107.             }
  2108.             priceArrays[10] = price;
  2109.         }
  2110.         else if (goodType == 11){
  2111.             if (land == 0){
  2112.                 inv_Country = furInvSwede;  
  2113.             }
  2114.             else if (land == 1){
  2115.                 inv_Country = furInvPol;    
  2116.             }
  2117.             else if (land == 2){
  2118.                 inv_Country = furInvRus;
  2119.             }
  2120.             //changes
  2121.             else if (land == 3){
  2122.                 inv_Country = furInvCri;
  2123.             }
  2124.             else if (land == 4){
  2125.                 inv_Country = furInvSau;
  2126.             }
  2127.             else if (land == 5){
  2128.                 inv_Country = furInvUkr;
  2129.             }
  2130.             else if (land == 6){
  2131.                 inv_Country = furInvChi;
  2132.             }
  2133.            
  2134.             if (inv_Country >= 57 && inv_Country <= 75){
  2135.                 price = furPrice[land] + randomnum;
  2136.             }
  2137.             else if (inv_Country >= 40 && inv_Country <= 56){
  2138.                 price = furPrice[land] * 1.25 + randomnum;
  2139.             }
  2140.             else if (inv_Country >= 20 && inv_Country <= 39){
  2141.                 price = furPrice[land] * 1.50 + randomnum;
  2142.             }
  2143.             else if (inv_Country <= 19){
  2144.                 price = furPrice[land] * 2 + randomnum;
  2145.             }
  2146.             else if (inv_Country > 75){
  2147.                 price = furPrice[land] * 0.75 + randomnum;
  2148.             }
  2149.             priceArrays[11] = price;
  2150.         }
  2151.         else if (goodType == 12){
  2152.             if (land == 0){
  2153.                 inv_Country = beerInvSwede;  
  2154.             }
  2155.             else if (land == 1){
  2156.                 inv_Country = beerInvPol;    
  2157.             }
  2158.             else if (land == 2){
  2159.                 inv_Country = beerInvRus;
  2160.             }
  2161.             //changes
  2162.             else if (land == 3){
  2163.                 inv_Country = beerInvCri;
  2164.             }
  2165.             else if (land == 4){
  2166.                 inv_Country = beerInvSau;
  2167.             }
  2168.             else if (land == 5){
  2169.                 inv_Country = beerInvUkr;
  2170.             }
  2171.             else if (land == 6){
  2172.                 inv_Country = beerInvChi;
  2173.             }
  2174.            
  2175.             if (inv_Country >= 57 && inv_Country <= 75){
  2176.                 price = beerPrice[land] + randomnum;
  2177.             }
  2178.             else if (inv_Country >= 40 && inv_Country <= 56){
  2179.                 price = beerPrice[land] * 1.25 + randomnum;
  2180.             }
  2181.             else if (inv_Country >= 20 && inv_Country <= 39){
  2182.                 price = beerPrice[land] * 1.50 + randomnum;
  2183.             }
  2184.             else if (inv_Country <= 19){
  2185.                 price = beerPrice[land] * 2 + randomnum;
  2186.             }
  2187.             else if (inv_Country > 75){
  2188.                 price = beerPrice[land] * 0.75 + randomnum;
  2189.             }
  2190.             priceArrays[12] = price;
  2191.         }else if (goodType == 13){
  2192.             if (land == 0){
  2193.                 inv_Country = saltInvSwede;  
  2194.             }
  2195.             else if (land == 1){
  2196.                 inv_Country = saltInvPol;    
  2197.             }
  2198.             else if (land == 2){
  2199.                 inv_Country = saltInvRus;
  2200.             }
  2201.             //changes
  2202.             else if (land == 3){
  2203.                 inv_Country = saltInvCri;
  2204.             }
  2205.             else if (land == 4){
  2206.                 inv_Country = saltInvSau;
  2207.             }
  2208.             else if (land == 5){
  2209.                 inv_Country = saltInvUkr;
  2210.             }
  2211.             else if (land == 6){
  2212.                 inv_Country = saltInvChi;
  2213.             }
  2214.            
  2215.             if (inv_Country >= 57 && inv_Country <= 75){
  2216.                 price = saltPrice[land] + randomnum;
  2217.             }
  2218.             else if (inv_Country >= 40 && inv_Country <= 56){
  2219.                 price = saltPrice[land] * 1.25 + randomnum;
  2220.             }
  2221.             else if (inv_Country >= 20 && inv_Country <= 39){
  2222.                 price = saltPrice[land] * 1.50 + randomnum;
  2223.             }
  2224.             else if (inv_Country <= 19){
  2225.                 price = saltPrice[land] * 2 + randomnum;
  2226.             }
  2227.             else if (inv_Country > 50){
  2228.                 price = saltPrice[land] * 0.75 + randomnum;
  2229.             }
  2230.             priceArrays[13] = price;
  2231.         }
  2232.         else if (goodType == 14){
  2233.             if (land == 0){
  2234.                 inv_Country = wineInvSwede;  
  2235.             }
  2236.             else if (land == 1){
  2237.                 inv_Country = wineInvPol;    
  2238.             }
  2239.             else if (land == 2){
  2240.                 inv_Country = wineInvRus;
  2241.             }
  2242.             //changes
  2243.             else if (land == 3){
  2244.                 inv_Country = wineInvCri;
  2245.             }
  2246.             else if (land == 4){
  2247.                 inv_Country = wineInvSau;
  2248.             }
  2249.             else if (land == 5){
  2250.                 inv_Country = wineInvUkr;
  2251.             }
  2252.             else if (land == 6){
  2253.                 inv_Country = wineInvChi;
  2254.             }
  2255.            
  2256.             if (inv_Country >= 57 && inv_Country <= 75){
  2257.                 price = winePrice[land] + randomnum;
  2258.             }
  2259.             else if (inv_Country >= 40 && inv_Country <= 56){
  2260.                 price = winePrice[land] * 1.25 + randomnum;
  2261.             }
  2262.             else if (inv_Country >= 20 && inv_Country <= 39){
  2263.                 price = winePrice[land] * 1.50 + randomnum;
  2264.             }
  2265.             else if (inv_Country <= 19){
  2266.                 price = winePrice[land] * 2 + randomnum;
  2267.             }
  2268.             else if (inv_Country > 75){
  2269.                 price = winePrice[land] * 0.75 + randomnum;
  2270.             }
  2271.             priceArrays[14] = price;
  2272.         }
  2273.        
  2274.         cout << "[" << i << "] " << tradeGoods[goodType] << " - Eur " << price;
  2275.         cout << endl;
  2276.         goodType++;
  2277.     }
  2278.  
  2279.     }
  2280.  
  2281. float random(float x){
  2282.     srand(time(0));
  2283.     x = rand() % 20 + (-20);
  2284.     return x;
  2285. }
  2286.  
  2287. //inv country function
  2288. void determineCountry(void){
  2289.     if (land == 0){
  2290.         if (goodType == 0) inv_Country = potInvSwede;
  2291. //      //potInv = 0, oilInv = 0; fishInv = 0; woolInv=0; velvetInv=0; toolsInv=0; spiceInv=0; ironInv=0; flourInv=0; dyeInv=0; leatherInv=0; furInv=0; beerInv=0, saltInv=0; wineInv=0;
  2292.         else if (goodType == 1) inv_Country = oilInvSwede;
  2293.         //addition
  2294.         else if (goodType == 2) inv_Country = fishInvSwede;
  2295.         else if (goodType == 3) inv_Country = woolInvSwede;
  2296.         else if (goodType == 4) inv_Country = velvetInvSwede;
  2297.         else if (goodType == 5) inv_Country = toolsInvSwede;
  2298.         else if (goodType == 6) inv_Country = spiceInvSwede;
  2299.         else if (goodType == 7) inv_Country = ironInvSwede;
  2300.         else if (goodType == 8) inv_Country = flourInvSwede;
  2301.         else if (goodType == 9) inv_Country = dyeInvSwede;
  2302.         else if (goodType == 10) inv_Country = leatherInvSwede;
  2303.         else if (goodType == 11) inv_Country = furInvSwede;
  2304.         else if (goodType == 12) inv_Country = beerInvSwede;
  2305.         else if (goodType == 13) inv_Country = saltInvSwede;
  2306.         else if (goodType == 14) inv_Country = wineInvSwede;
  2307.        
  2308.     }
  2309.     else if (land == 1){
  2310.         if (goodType == 0) inv_Country = potInvPol;
  2311.         else if (goodType == 1) inv_Country = oilInvPol;
  2312.         else if (goodType == 2) inv_Country = fishInv;
  2313.         else if (goodType == 3) inv_Country = woolInvPol;
  2314.         else if (goodType == 4) inv_Country = velvetInvPol;
  2315.         else if (goodType == 5) inv_Country = toolsInvPol;
  2316.         else if (goodType == 6) inv_Country = spiceInvPol;
  2317.         else if (goodType == 7) inv_Country = ironInvPol;
  2318.         else if (goodType == 8) inv_Country = flourInvPol;
  2319.         else if (goodType == 9) inv_Country = dyeInvPol;
  2320.         else if (goodType == 10) inv_Country = leatherInvPol;
  2321.         else if (goodType == 11) inv_Country = furInvPol;
  2322.         else if (goodType == 12) inv_Country = beerInvPol;
  2323.         else if (goodType == 13) inv_Country = saltInvPol;
  2324.         else if (goodType == 14) inv_Country = wineInvPol;
  2325.     }
  2326.     else if (land == 2){
  2327.         if (goodType == 0) inv_Country = potInvRus;
  2328.         else if (goodType == 1) inv_Country = oilInvRus;
  2329.         else if (goodType == 2) inv_Country = fishInvRus;
  2330.         else if (goodType == 3) inv_Country = woolInvRus;
  2331.         else if (goodType == 4) inv_Country = velvetInvRus;
  2332.         else if (goodType == 5) inv_Country = toolsInvRus;
  2333.         else if (goodType == 6) inv_Country = spiceInvRus;
  2334.         else if (goodType == 7) inv_Country = ironInvRus;
  2335.         else if (goodType == 8) inv_Country = flourInvRus;
  2336.         else if (goodType == 9) inv_Country = dyeInvRus;
  2337.         else if (goodType == 10) inv_Country = leatherInvRus;
  2338.         else if (goodType == 11) inv_Country = furInvRus;
  2339.         else if (goodType == 12) inv_Country = beerInvRus;
  2340.         else if (goodType == 13) inv_Country = saltInvRus;
  2341.         else if (goodType == 14) inv_Country = wineInvRus;
  2342.     }
  2343.     //changes
  2344.     else if (land == 3){
  2345.         if (goodType == 0) inv_Country = potInvCri;
  2346.         else if (goodType == 1) inv_Country = oilInvCri;
  2347.         else if (goodType == 2) inv_Country = fishInvCri;
  2348.         else if (goodType == 3) inv_Country = woolInvCri;
  2349.         else if (goodType == 4) inv_Country = velvetInvCri;
  2350.         else if (goodType == 5) inv_Country = toolsInvCri;
  2351.         else if (goodType == 6) inv_Country = spiceInvCri;
  2352.         else if (goodType == 7) inv_Country = ironInvCri;
  2353.         else if (goodType == 8) inv_Country = flourInvCri;
  2354.         else if (goodType == 9) inv_Country = dyeInvCri;
  2355.         else if (goodType == 10) inv_Country = leatherInvCri;
  2356.         else if (goodType == 11) inv_Country = furInvCri;
  2357.         else if (goodType == 12) inv_Country = beerInvCri;
  2358.         else if (goodType == 13) inv_Country = saltInvCri;
  2359.         else if (goodType == 14) inv_Country = wineInvCri;
  2360.     }
  2361.     else if (land == 4){
  2362.         if (goodType == 0) inv_Country = potInvSau;
  2363.         else if (goodType == 1) inv_Country = oilInvSau;
  2364.         else if (goodType == 2) inv_Country = fishInvSau;
  2365.         else if (goodType == 3) inv_Country = woolInvSau;
  2366.         else if (goodType == 4) inv_Country = velvetInvSau;
  2367.         else if (goodType == 5) inv_Country = toolsInvSau;
  2368.         else if (goodType == 6) inv_Country = spiceInvSau;
  2369.         else if (goodType == 7) inv_Country = ironInvSau;
  2370.         else if (goodType == 8) inv_Country = flourInvSau;
  2371.         else if (goodType == 9) inv_Country = dyeInvSau;
  2372.         else if (goodType == 10) inv_Country = leatherInvSau;
  2373.         else if (goodType == 11) inv_Country = furInvSau;
  2374.         else if (goodType == 12) inv_Country = beerInvSau;
  2375.         else if (goodType == 13) inv_Country = saltInvSau;
  2376.         else if (goodType == 14) inv_Country = wineInvSau;
  2377.     }
  2378.     else if (land == 5){
  2379.         if (goodType == 0) inv_Country = potInvUkr;
  2380.         else if (goodType == 1) inv_Country = oilInvUkr;
  2381.         else if (goodType == 2) inv_Country = fishInvUkr;
  2382.         else if (goodType == 3) inv_Country = woolInvUkr;
  2383.         else if (goodType == 4) inv_Country = velvetInvUkr;
  2384.         else if (goodType == 5) inv_Country = toolsInvUkr;
  2385.         else if (goodType == 6) inv_Country = spiceInvUkr;
  2386.         else if (goodType == 7) inv_Country = ironInvUkr;
  2387.         else if (goodType == 8) inv_Country = flourInvUkr;
  2388.         else if (goodType == 9) inv_Country = dyeInvUkr;
  2389.         else if (goodType == 10) inv_Country = leatherInvUkr;
  2390.         else if (goodType == 11) inv_Country = furInvUkr;
  2391.         else if (goodType == 12) inv_Country = beerInvUkr;
  2392.         else if (goodType == 13) inv_Country = saltInvUkr;
  2393.         else if (goodType == 14) inv_Country = wineInvUkr;
  2394.     }
  2395.     else if (land == 6){
  2396.         if (goodType == 0) inv_Country = potInvChi;
  2397.         else if (goodType == 1) inv_Country = oilInvChi;
  2398.         else if (goodType == 2) inv_Country = fishInvChi;
  2399.         else if (goodType == 3) inv_Country = woolInvChi;
  2400.         else if (goodType == 4) inv_Country = velvetInvChi;
  2401.         else if (goodType == 5) inv_Country = toolsInvChi;
  2402.         else if (goodType == 6) inv_Country = spiceInvChi;
  2403.         else if (goodType == 7) inv_Country = ironInvChi;
  2404.         else if (goodType == 8) inv_Country = flourInvChi;
  2405.         else if (goodType == 9) inv_Country = dyeInvChi;
  2406.         else if (goodType == 10) inv_Country = leatherInvChi;
  2407.         else if (goodType == 11) inv_Country = furInvChi;
  2408.         else if (goodType == 12) inv_Country = beerInvChi;
  2409.         else if (goodType == 13) inv_Country = saltInvChi;
  2410.         else if (goodType == 14) inv_Country = wineInvChi;
  2411.     }
  2412.  
  2413.     }
  2414.  
  2415. void eventsNumbers(void)
  2416. {
  2417.     srand(time(0));
  2418.     int randomEvent;
  2419.     if (turn<=10)
  2420.     {randomEvent=rand()%10+1;
  2421.     events(randomEvent);}
  2422.     else if (turn>=11&&turn<=20)
  2423.     {randomEvent=rand()%20+1;
  2424.     events(randomEvent);}
  2425.     else if (turn>=21&&turn<=30)
  2426.     {randomEvent=rand()%30+1;
  2427.     events(randomEvent);}
  2428.     else if (turn>=31&&turn<=40)
  2429.     {randomEvent=rand()%40+1;
  2430.     events(randomEvent);}
  2431.     else if (turn>=41&&turn<=50)
  2432.     {randomEvent=rand()%50+1;
  2433.     events(randomEvent);}
  2434. }
  2435.  
  2436. void events(int random)
  2437. {
  2438.     int x;
  2439.     random=35;
  2440.     switch (random){
  2441.         case 1:
  2442.             cout<<"The company thought that you were incompetent, so they see fit that you would lose Eur 2000.! Skip a turn and lose Eur 2000."<<endl;
  2443.  
  2444.             if(GOOJcard>=1)
  2445.             {
  2446.                 cout << "Turns out you have that get out of jail card . . . ";
  2447. cout << endl << "You can only get so lucky." << endl;
  2448.                 GOOJcard--;
  2449.             }
  2450.             else
  2451.             {
  2452.             turn++;
  2453.             balance=balance-2000;
  2454.             }
  2455.             break;
  2456.         case 3:
  2457.             cout<<"Psst! Someone just handed you a lucky card!"<<endl;
  2458.             GOOJcard=1;
  2459.             break;
  2460.         case 5:
  2461.             cout<<"The company’s stocks gambit paid off! Your company saw fit to give you extra money for trading goods. Receive Eur 1000."<<endl;
  2462.             balance=balance+1000;
  2463.             break;
  2464.         case 7:
  2465.             cout<<"The company thought that your performance was astounding. Receive Eur 500 for trading."<<endl;
  2466.             balance=balance+500;
  2467.             break;
  2468.         case 9:
  2469.             cout<<"Your company wants to use the money from trading for other assets. Lose Eur 1500."<<endl;
  2470.             balance=balance-1500;
  2471.             break;
  2472.         case 11:
  2473.             cout<<"It's tax season! Lose a percentage of your trading balance based on the number of goods in Inventory."<<endl;
  2474.             balance=balance-(potInv*160*0.075+oilInv*400*0.075);
  2475.             break;
  2476.         case 13:
  2477.             cout<<"You go to jail! Skip a turn and lose Eur 2000."<<endl;
  2478.             if(GOOJcard>=1)
  2479.             {
  2480.                 cout<<"Turns out you have that get out of jail card . . . .” << endl << “You can only get so lucky."<<endl;
  2481.                 GOOJcard--;
  2482.             }
  2483.             else
  2484.             {
  2485.             turn++;
  2486.             balance=balance-2000;
  2487.             }
  2488.             break;
  2489.         case 15:
  2490.             cout<<"The company uses your trading balance to pay its debt. Lose half of your trading balance."<<endl;
  2491.             balance=balance/2;
  2492.             break;
  2493.         case 17:
  2494.             cout<<"The company’s data was attacked by encryption virus. You lose half of your trading money to pay for ransomware."<<endl;
  2495.             balance=balance/2;
  2496.             break;
  2497.         case 19:
  2498.             cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
  2499.             balance=balance-1000;
  2500.             investment++;
  2501.             break;
  2502.         case 21:
  2503.             cout<<"One of the cargo ships got lost in the transit! Lose Eur 7000."<<endl;
  2504.             balance-=7000;
  2505.             break;
  2506.         case 23:
  2507.             cout<<"The company thought that you were incompetent, so they see fit that you would lose Eur 2000.! Skip a turn and lose Eur 2000."<<endl;
  2508.             if(GOOJcard>=1)
  2509.             {
  2510.                 cout<<"Turns out you have that get out of jail card . . . .” << endl << “You can only get so lucky."<<endl;
  2511.                 GOOJcard--;
  2512.             }
  2513.             else
  2514.             {
  2515.             turn++;
  2516.             balance=balance-2000;
  2517.             }
  2518.             break;
  2519.  
  2520.         case 25:
  2521.             cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
  2522.             balance=balance-1000;
  2523.             investment++;
  2524.             break;
  2525.         case 27:
  2526.             if(investment>=4)
  2527.             {
  2528.                 cout<<"The company’s investment paid off! Receive Eur 10000."<<endl;
  2529.                 balance+=10000;
  2530.             }
  2531.             else
  2532.             {
  2533.                 cout<<"The company’s investment failed. Along with the few assets you gave them! Lose Eur 2000."<<endl;
  2534.                 balance-=2000;
  2535.             }
  2536.             break;
  2537.         case 29:
  2538.             cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose Eur 5000."<<endl;
  2539.             balance-=5000;
  2540. break;
  2541.         case 31:
  2542.             cout<<"The stakes are getting higher, you need more money. Receive 50% added more trading money."<<endl;
  2543.             balance=balance*1.5;
  2544. break;
  2545.         case 33:
  2546.             cout<<"Enemy corporations manufactured scandals about your company. Fighting lawsuit after lawsuit is tiring, as well as expensive. Skip 2 turns and lose Eur 8000."<<endl;
  2547.             if(GOOJcard>=1)
  2548.             {
  2549.                 cout<<"Fortunately however, you have that mysterious lucky card that man gave you. It vanished, as well as somehow the problems that plagued you."<<endl;
  2550.                 GOOJcard--;
  2551.             }
  2552.             else
  2553.             {
  2554.             turn++;
  2555.             balance=balance-2000;
  2556.             }
  2557. break;
  2558.         case 35:
  2559.             if (event35==0)
  2560.             {
  2561.                 cout<<"A man approached you, and said, 'I am part of an organization named Cauldron. We would like your sponsorship in order to progress our plans with saving Mother Earth.' What do you do? (1 Yes/2 No)"<<endl;
  2562.                 do {
  2563.                     cout << "Enter Input: ";
  2564.                     cin >> input;
  2565.                     stringstream(input) >> x;
  2566.                     switch (x){
  2567.                         case 1:
  2568.                             cout<<"Thank you for your patronage. We will not forget this.";
  2569.                             Cauldron++;
  2570.                             break;
  2571.                         case 2:
  2572.                             cout<<"I see . . . I hope you don't regret your decision.";
  2573.                             break;
  2574.                         default:
  2575.                             cout<<"Invalid input. Please try again.";
  2576.                             break;
  2577.                             }
  2578.                     break;
  2579.                 } while (input != "1" || input != "2");
  2580.                 event35=1;
  2581.             }
  2582.             else
  2583.             {
  2584.                 cout<<"A strange wind flows today. Had something changed?";
  2585.                 break;
  2586.             }
  2587. break;
  2588.         case 37:
  2589.             cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
  2590.             balance=balance-1000;
  2591.             investment++;
  2592.             break;
  2593.         case 39:
  2594.             cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose €5000."<<endl;
  2595.             balance-=5000;
  2596. break;
  2597.         case 41:
  2598.             cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose €5000."<<endl;
  2599.             balance-=5000;
  2600.         case 43:
  2601.             cout<<"You invested in a certain stock. Something may come out of this . . . Lose Eur 1000."<<endl;
  2602.             balance=balance-1000;
  2603.             investment++;
  2604.             break;
  2605.         case 45:
  2606.             cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose Eur 5000."<<endl;
  2607.             balance-=5000;
  2608.         case 47:
  2609.             cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
  2610.             balance=balance-1000;
  2611.             investment++;
  2612.             break;
  2613.         case 49:
  2614.             if(Cauldron==1)
  2615.             {
  2616.                 cout<<"All of a sudden, the company’s profits soard! Your money is doubled.";
  2617.                 balance=balance*2;
  2618.             }
  2619.             else
  2620.             {
  2621.                 cout<<"All of a sudden, natural disasters began to strike at your holdings! Your money is quartered.";
  2622.                 balance=balance/4;
  2623.             }
  2624.             break;
  2625.         default:
  2626.             cout << "No significant events have occurred!"<<endl;
  2627.             break;
  2628.     }
  2629. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement