Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <sstream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- //Escape add
- float random(float x);
- string input;
- //Global
- //Inventory
- 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;
- int qty = 0; //quantity
- int inv = 0;
- //User
- float balance = 5000;
- //Trade Goods Prices, in order: Sweden, Poland
- //Escape-add;
- float x;
- float randomnum = random(x);
- float potPrice[7] = {90, 157.5, 157.5, 99, 67.5, 99, 90};
- float oilPrice[7] = {400, 300, 700, 700, 440, 440, 400};
- float fishPrice[7] = {50, 55, 87.5, 55, 87.5, 55, 50};
- float woolPrice[7] = {240, 180, 180, 264, 264, 264, 240};
- float velvetPrice[7] = {950, 1662.5, 1662.5, 990, 712.5, 990, 950};
- float toolsPrice[7] = {400, 300, 700, 440, 440, 400};
- float spicePrice[7] = {800, 1400, 600, 880, 600, 880, 800};
- float ironPrice[7] = {220, 365, 365, 365, 165, 242, 220};
- float flourPrice[7] = {50, 37.5, 87.5, 55, 87.5, 55, 50};
- float dyePrice[7] = {180, 198, 135, 198, 198, 198, 180};
- float leatherPrice[7] = {180, 198, 315, 135, 135, 198, 180};
- float furPrice[7] = {390, 429, 292.5, 429, 429, 429, 390};
- float beerPrice[7] = {100, 75, 175, 175, 175, 110, 100};
- float saltPrice[7] = {220, 165, 385, 165, 165, 242, 220};
- float winePrice[7] = {200, 220, 150, 220, 220, 220, 200};
- float price;
- float priceArrays[100];
- //Country Mem
- string country = "None"; //Starting
- string place[7] = { "Sweden", "Poland", "Russia", "Crimea", "Saudi Arabia", "Ukraine", "China"};
- int land; //index
- //Country Inv (Default inv)
- //surplus 200%;
- //well-met 100%;
- //high 75%; med 50%; low 25%;
- int potInvSwede = 150, potInvPol = 50, potInvRus = 100, potInvCri = 75, potInvSau= 150, potInvUkr= 75, potInvChi= 100; //well 100
- int oilInvSwede = 25, oilInvPol = 75, oilInvRus = 45, oilInvCri= 25, oilInvSau= 38, oilInvUkr= 38, oilInvChi= 50; //well 50
- int fishInvSwede = 150, fishInvPol = 113, fishInvRus = 75, fishInvCri= 113, fishInvSau = 75, fishInvUkr = 113, fishInvChi = 150; //well 75
- int woolInvSwede = 75, woolInvPol = 56, woolInvRus = 113, woolInvCri= 56, woolInvSau = 56, woolInvUkr = 56, woolInvChi=75; //well 75
- int velvetInvSwede =25, velvetInvPol = 13, velvetInvRus = 13, velvetInvCri = 19, velvetInvSau=38, velvetInvUkr = 19, velvetInvChi=25; //well 25
- int toolsInvSwede = 50, toolsInvPol = 75, toolsInvRus = 38, toolsInvCri=38, toolsInvSau=38, toolsInvUkr = 38, toolsInvChi=50; //well 50
- int spiceInvSwede = 30, spiceInvPol = 15, spiceInvRus = 45, spiceInvCri= 23, spiceInvSau= 23, spiceInvUkr = 23, spiceInvChi=30; //well 30
- int ironInvSwede = 100, ironInvPol = 50, ironInvRus = 50, ironInvCri= 50, ironInvSau=75, ironInvUkr = 75, ironInvChi = 100; //well 100
- int flourInvSwede = 150, flourInvPol = 113, flourInvRus = 75, flourInvCri= 113, flourInvSau= 75, flourInvUkr = 113, flourInvChi = 150; //well 150
- int dyeInvSwede = 75, dyeInvPol = 56, dyeInvRus= 113, dyeInvCri = 56, dyeInvSau= 56, dyeInvUkr = 56, dyeInvChi = 75; //well 75
- int leatherInvSwede = 75, leatherInvPol = 56, leatherInvRus = 38, leatherInvCri = 113, leatherInvSau=56, leatherInvUkr = 56, leatherInvChi = 75; //well 75
- int furInvSwede = 75, furInvPol = 56, furInvRus = 113, furInvCri = 56, furInvSau=56, furInvUkr = 56, furInvChi = 75; //well 75
- int beerInvSwede =75, beerInvPol = 113, beerInvRus = 56, beerInvCri = 38, beerInvSau=38, beerInvUkr = 56, beerInvChi = 75; //well 75
- int saltInvSwede =75, saltInvPol = 38, saltInvRus = 56, saltInvCri = 113, saltInvSau=113, saltInvUkr = 56, saltInvChi = 75; //well 75
- int wineInvSwede =75, wineInvPol = 56, wineInvRus = 56, wineInvCri = 113, wineInvSau=56, wineInvUkr = 56, wineInvChi = 75; //well 75
- int inv_Country = 0; // For loop inv
- //Goods
- string tradeGoods[15] = { "Pottery ", "Oil ", "Fish ", "Wool Cloth ", "Velvet " , "Tools ", "Spices ", "Iron ", "Flour ", "Dyes ", "Leatherworks ", "Fur ", "Beer " , "Salt ", "Wine " };int goodNo;
- int goodType;
- //int remember strings
- int mem = 0; //inv
- int mem2 = 0; //notes
- int mem3 = 0; //buy/sell
- //Turn Counter;
- //event variables
- int GOOJcard=0; // Get out of jail
- int turn=1;
- int investment=0;
- int event35=0;
- int Cauldron=0;
- int checkers=0;
- //End of Global
- //Escape add
- void random(void);
- //What do I do first?
- void loc(void);
- //User's Inventory
- void check(void);
- //Trade
- void trade(void);
- //Buy function
- void buy(void);
- //traded
- void traded(void);
- //Quantity function
- void quantity(void);
- //lack function
- void lack(void);
- //Sell function
- void sell(void);
- //Goods function
- void goods(void);
- //Notes function
- void notes(void);
- //Balance function
- void balance_balance(void);
- //todo
- void todo(void);
- void todo2(void);
- //Country Inventory
- void countryInv(void);
- void determineCountry(void);
- //Turn-based Events
- void turnCounter(void);
- void eventsNumbers(void);
- void events(int random);
- main(){
- if(balance<0)
- {
- cout << "You are now bankrupt. Game Over.";
- }
- if (turn<=50) loc();
- else{
- cout<<"Your total money came to:" << balance;
- }
- cout << "\nThanks for playing this simulator.";
- exit(0);
- }
- //loc function
- void loc(void){
- if (turn<50 && checkers==0)
- {
- cout<<"Turn: "<<turn<<endl;
- eventsNumbers();
- }
- else if (turn==50 && checkers==0)
- {
- cout<<"Turn: "<<turn<<" (LAST TURN!)"<<endl;
- eventsNumbers();
- }
- else if (checkers==0)
- {
- main();
- }
- if (balance<0)
- {
- main();}
- country = "None";
- int x = 0;
- mem = 0;
- mem2 = 0;
- cout << endl;
- cout << endl;
- cout << "Balance: Eur " << balance; cout << endl;
- cout << "What do you want to do?";
- cout << endl;
- cout << "[1] Trade";
- cout << endl;
- cout << "[2] Check Inventory";
- cout << endl;
- cout << "[3] Exit";
- cout << endl;
- do {
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x)
- {
- case 1:
- trade();
- break;
- case 2:
- checkers=1;
- check();
- break;
- case 3:
- abort();
- default:
- cout << "That's an invalid option. Please try again.";
- }
- cout << endl;
- } while (input != "1" || input != "2");
- }
- //check function
- void check(void){
- cout << endl;
- cout << "You currently have:";
- cout << endl;
- cout << potInv << " Pottery";
- cout << endl;
- cout << oilInv << " Oil";
- cout << endl;
- //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;
- cout << fishInv << " Fish";
- cout << endl;
- cout << woolInv << " Wool Cloth";
- cout << endl;
- cout << velvetInv << " Velvet";
- cout << endl;
- cout << toolsInv << " Tools";
- cout << endl;
- cout << spiceInv << " Spice";
- cout << endl;
- cout << ironInv << " Iron";
- cout << endl;
- cout << flourInv << " Flour";
- cout << endl;
- cout << dyeInv << " Dye";
- cout << endl;
- cout << leatherInv << " Leatherworks";
- cout << endl;
- cout << furInv << " Fur";
- cout << endl;
- cout << beerInv << " Beer";
- cout << endl;
- cout << saltInv << " Salt";
- cout << endl;
- cout << wineInv << " Wine";
- cout << endl;
- cout << " ...in your inventory.";
- cout << endl;
- system("pause");
- switch (mem){
- case 0:
- checkers=1;
- loc();
- break;
- case 1:
- trade();
- break;
- case 2:
- buy();
- break;
- case 3:
- sell();
- break;
- case 4:
- todo2();
- break;
- }
- }
- //trade function
- void trade(void){
- mem = 1;
- string input;
- country = "None";
- mem2 = 1;
- int x;
- cout << endl;
- cout << "Country List: ";
- cout << endl;
- cout << "[1] " << "Sweden";
- cout << endl;
- cout << "[2] " << "Poland";
- cout << endl;
- cout << "[3] " << "Russia";
- cout << endl;
- cout << "[4] " << "Crimea";
- cout << endl;
- cout << "[5] " << "Saudi Arabia";
- cout << endl;
- cout << "[6] " << "Ukraine";
- cout << endl;
- cout << "[7] " << "China";
- cout << endl;
- cout << "[8] " << "Check inventory";
- cout << endl;
- cout << "[9] " << "Check notes";
- cout << endl;
- cout << "[10] " << "Return";
- cout << endl;
- do{
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x){
- case 1:
- land = 0; // Sweden
- todo();
- break;
- case 2:
- land = 1; // Poland
- todo();
- break;
- case 3:
- land = 2; // Russia
- todo();
- break;
- case 4:
- land = 3; // Crimea
- todo();
- break;
- case 5:
- land = 4; // Saudi
- todo();
- break;
- case 6:
- land = 5; // Ukraine
- todo();
- break;
- case 7:
- land = 6; // China
- todo();
- break;
- case 8:
- checkers=1;
- check();
- break;
- case 9:
- checkers=1;
- notes();
- break;
- case 10:
- checkers=1;
- loc();
- break;
- default:
- cout << "That's an invalid option. Please try again.";
- cout << endl;
- break;
- }
- }while (input != "1" || input != "2" || input != "3" || input != "4" || input != "5" || input != "6"|| input != "7" || input !="8" || input != "9" || input != "10");
- cout << endl;
- }
- //goods function
- void goods(void){
- cout << setprecision(2) << fixed;
- cout << endl;
- random();
- cout << "[16] " << "Check inventory";
- cout << endl;
- cout << "[17] " << "Check notes";
- cout << endl;
- cout << "[18] " << "Return";
- cout << endl;
- }
- //buy function
- void buy(void){
- string input;
- int x;
- mem = 2;
- mem2 = 2;
- mem3 = 0;
- if (land == 0){
- cout << endl;
- cout << "You are trading with Sweden ... ";
- cout << endl;
- }
- else if (land == 1){
- cout << endl;
- cout << "You are trading with Poland ... ";
- cout << endl;
- }
- else if (land == 2){
- cout << endl;
- cout << "You are trading with Russia ... ";
- cout << endl;
- }
- else if (land == 3){
- cout << endl;
- cout << "You are trading with Crimea . . . ";
- cout << endl;
- }
- else if (land == 4){
- cout << endl;
- cout << "You are trading with Saudi Arabia . . . ";
- cout << endl;
- }
- else if (land == 5){
- cout << endl;
- cout << "You are trading with Ukraine . . . ";
- cout << endl;
- }
- else if (land == 6){
- cout << endl;
- cout << "You are trading with China . . . ";
- cout << endl;
- }
- country = "None";
- balance_balance();
- goods();
- cout << "What do you want to buy? ";
- cout << endl;
- do{
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x){
- case 1:
- goodType = 0;
- determineCountry();
- inv = potInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 2:
- goodType = 1;
- determineCountry();
- inv = oilInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 3:
- goodType = 2;
- determineCountry();
- inv = fishInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 4:
- goodType = 3;
- determineCountry();
- inv = woolInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 5:
- goodType = 4;
- determineCountry();
- inv = velvetInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 6:
- goodType = 5;
- determineCountry();
- inv = toolsInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 7:
- goodType = 6;
- determineCountry();
- inv = spiceInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- //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;
- case 8:
- goodType = 7;
- determineCountry();
- inv = ironInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 9:
- goodType = 8;
- determineCountry();
- inv = flourInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 10:
- goodType = 9;
- determineCountry();
- inv = dyeInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 11:
- goodType = 10;
- determineCountry();
- inv = leatherInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 12:
- goodType = 11;
- determineCountry();
- inv = furInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 13:
- goodType = 12;
- determineCountry();
- inv = beerInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 14:
- goodType = 13;
- determineCountry();
- inv = saltInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 15:
- goodType = 14;
- determineCountry();
- inv = wineInv;
- price = priceArrays[goodType];
- quantity();
- if (balance < qty *price){
- lack();
- break;
- }
- else if (balance >= qty *price){
- traded();
- break;
- }
- case 16:
- check();
- break;
- case 17:
- notes();
- break;
- case 18:
- trade();
- break;
- default:
- cout << "That's an invalid option. Please try again.";
- cout << endl;
- }
- } 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");
- }
- //traded function
- void traded(void){
- cout << setprecision(2) << fixed;
- if (mem3 == 0){ //buy
- balance -= qty * price;
- balance_balance();
- cout << endl;
- cout << "You bought " << tradeGoods[goodType] << "for Eur " << qty * price << ".";
- cout << endl;
- if (goodType==0) potInv+=qty;
- else if (goodType==1) oilInv+=qty;
- else if (goodType==2) fishInv+=qty;
- else if (goodType==3) woolInv+=qty;
- else if (goodType==4) velvetInv+=qty;
- else if (goodType==5) toolsInv+=qty;
- else if (goodType==6) spiceInv+=qty;
- else if (goodType==7) ironInv+=qty;
- else if (goodType==8) flourInv+=qty;
- else if (goodType==9) dyeInv+=qty;
- else if (goodType==10) leatherInv+=qty;
- else if (goodType==11) furInv+=qty;
- else if (goodType==12) beerInv+=qty;
- else if (goodType==13) saltInv+=qty;
- else if (goodType==14) wineInv+=qty;
- }
- else if (mem3 == 1){ //sell
- balance += qty * price;
- balance_balance();
- cout << endl;
- cout << "You sold " << tradeGoods[goodType] << " for Eur " << qty * price << ".";
- cout << endl;
- if (goodType==0) potInv-=qty;
- else if (goodType==1) oilInv-=qty;
- else if (goodType==2) fishInv-=qty;
- else if (goodType==3) woolInv-=qty;
- else if (goodType==4) velvetInv-=qty;
- else if (goodType==5) toolsInv-=qty;
- else if (goodType==6) spiceInv-=qty;
- else if (goodType==7) ironInv-=qty;
- else if (goodType==8) flourInv-=qty;
- else if (goodType==9) dyeInv-=qty;
- else if (goodType==10) leatherInv-=qty;
- else if (goodType==11) furInv-=qty;
- else if (goodType==12) beerInv-=qty;
- else if (goodType==13) saltInv-=qty;
- else if (goodType==14) wineInv-=qty;
- cout << endl;
- }
- turn++;
- checkers=0;
- if(turn%20==0)
- {
- potInvSwede*=1.1;
- potInvPol*=1.1;
- potInvRus*=1.1;
- potInvCri*=1.1;
- potInvSau*=1.1;
- potInvUkr*=1.1;
- potInvChi*=1.1;
- oilInvSwede*=1.1;
- oilInvPol*=1.1;
- oilInvRus*=1.1 ;
- oilInvCri*=1.1;
- oilInvSau*=1.1;
- oilInvUkr*=1.1;
- oilInvChi*=1.1;
- fishInvSwede*=1.1;
- fishInvPol*=1.1;
- fishInvRus*=1.1;
- fishInvCri*=1.1;
- fishInvSau*=1.1;
- fishInvUkr*=1.1;
- fishInvChi*=1.1;
- woolInvSwede*=1.1;
- woolInvPol*=1.1;
- woolInvRus*=1.1;
- woolInvCri*=1.1;
- woolInvSau*=1.1;
- woolInvUkr*=1.1;
- woolInvChi*=1.1;
- velvetInvSwede*=1.1;
- velvetInvPol*=1.1;
- velvetInvRus*=1.1;
- velvetInvCri*=1.1;
- velvetInvSau*=1.1;
- velvetInvUkr*=1.1;
- velvetInvChi*=1.1;
- toolsInvSwede*=1.1;
- toolsInvPol*=1.1;
- toolsInvRus*=1.1;
- toolsInvCri*=1.1;
- toolsInvSau*=1.1;
- toolsInvUkr*=1.1;
- toolsInvChi*=1.1;
- spiceInvSwede*=1.1;
- spiceInvPol*=1.1;
- spiceInvRus*=1.1;
- spiceInvCri*=1.1;
- spiceInvSau*=1.1;
- spiceInvUkr*=1.1;
- spiceInvChi*=1.1;
- ironInvSwede*=1.1;
- ironInvPol*=1.1;
- ironInvRus*=1.1;
- ironInvCri*=1.1;
- ironInvSau*=1.1;
- ironInvUkr*=1.1;
- ironInvChi*=1.1;
- flourInvSwede*=1.1;
- flourInvPol*=1.1;
- flourInvRus*=1.1;
- flourInvCri*=1.1;
- flourInvSau*=1.1;
- flourInvUkr*=1.1;
- flourInvChi*=1.1;
- dyeInvSwede*=1.1;
- dyeInvPol*=1.1;
- dyeInvRus*=1.1;
- dyeInvCri*=1.1;
- dyeInvSau*=1.1;
- dyeInvUkr*=1.1;
- dyeInvChi*=1.1;
- leatherInvSwede*=1.1;
- leatherInvPol*=1.1;
- leatherInvRus*=1.1;
- leatherInvCri*=1.1;
- leatherInvSau*=1.1;
- leatherInvUkr*=1.1;
- leatherInvChi*=1.1;
- furInvSwede*=1.1;
- furInvPol*=1.1;
- furInvRus*=1.1;
- furInvCri*=1.1;
- furInvSau*=1.1;
- furInvUkr*=1.1;
- furInvChi*=1.1;
- beerInvSwede*=1.1;
- beerInvPol*=1.1;
- beerInvRus*=1.1;
- beerInvCri*=1.1;
- beerInvSau*=1.1;
- beerInvUkr*=1.1;
- beerInvChi*=1.1;
- saltInvSwede*=1.1;
- saltInvPol*=1.1;
- saltInvRus*=1.1;
- saltInvCri*=1.1;
- saltInvSau*=1.1;
- saltInvUkr*=1.1;
- saltInvChi*=1.1;
- wineInvSwede*=1.1;
- wineInvPol*=1.1;
- wineInvRus*=1.1;
- wineInvCri*=1.1;
- wineInvSau*=1.1;
- wineInvUkr*=1.1;
- wineInvChi*=1.1;
- }
- system("pause");
- loc();
- }
- //quantity function
- void quantity(void){
- mem = 4;
- if (mem3 == 0){
- cout << "How many " << tradeGoods[goodType] << " do you want to buy? ";
- cin >> qty;
- if (qty < 0){
- quantity();
- }
- countryInv();
- }
- else if (mem3 == 1){
- cout << "How many " << tradeGoods[goodType] << " do you want to sell? ";
- cin >> qty;
- if (qty < 0){
- quantity();
- }
- countryInv();
- }
- else quantity();
- }
- //lacking function
- void lack(void){
- if (mem3 == 0){
- cout << endl;
- cout << "You have insufficient balance ... ";
- cout << endl;
- system("pause");
- buy();
- }
- else if (mem3 == 1){
- cout << endl;
- cout << "You don't have " << qty << " of " << tradeGoods[goodType];
- cout << endl;
- system("pause");
- sell();
- }
- }
- //sell function
- void sell(void){
- string input;
- int x;
- mem = 3;
- mem2 = 3;
- mem3 = 1;
- country = "None";
- balance_balance();
- goods();
- cout << "What do you want to sell? ";
- cout << endl;
- do {
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x){
- case 1:
- goodType = 0;
- determineCountry();
- inv = potInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 2:
- goodType = 1;
- determineCountry();
- inv = oilInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 3:
- goodType = 2;
- determineCountry();
- inv = fishInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 4:
- goodType = 3;
- determineCountry();
- inv = woolInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 5:
- goodType = 4;
- determineCountry();
- inv = velvetInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 6:
- goodType = 5;
- determineCountry();
- inv = toolsInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 7:
- goodType = 6;
- determineCountry();
- inv = spiceInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 8:
- goodType = 7;
- determineCountry();
- inv = ironInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 9:
- goodType = 8;
- determineCountry();
- inv = flourInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 10:
- goodType = 9;
- determineCountry();
- inv = dyeInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 11:
- goodType = 10;
- determineCountry();
- inv = leatherInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 12:
- goodType = 11;
- determineCountry();
- inv = furInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 13:
- goodType = 12;
- determineCountry();
- inv = beerInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 14:
- goodType = 13;
- determineCountry();
- inv = saltInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 15:
- goodType = 14;
- determineCountry();
- inv = wineInv;
- price = priceArrays[goodType];
- quantity();
- if (inv < qty){
- lack();
- break;
- }
- else if (inv >= qty){
- traded();
- break;
- }
- case 16:
- check();
- break;
- case 17:
- notes();
- break;
- case 18:
- trade();
- break;
- default:
- cout << "That's an invalid option. Please try again.";
- cout << endl;
- } }while (input != "1" || input != "2"|| input != "3"|| input != "4"|| input != "5"|| input != "6"|| input != "7");
- }
- //notes function
- void notes(void){
- if (country == "Sweden"){
- cout << endl;
- cout << "Sweden's exports and imports are well-met . . . ";
- cout << endl;
- //For checking . . .
- cout << "Sweden's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvSwede;
- cout << endl;
- cout << "Oil: " << oilInvSwede;
- cout << endl;
- cout << "Fish: " << fishInvSwede;
- cout << endl;
- cout << "Wool Cloth:" << woolInvSwede;
- cout << endl;
- cout << "Velvet: " << velvetInvSwede;
- cout << endl;
- cout << "Tools: " << toolsInvSwede;
- cout << endl;
- cout << "Spice: " << spiceInvSwede;
- cout << endl;
- cout << "Iron: " << ironInvSwede;
- cout << endl;
- cout << "Flour: " << flourInvSwede;
- cout << endl;
- cout << "Dyes: " << dyeInvSwede;
- cout << endl;
- cout << "Leatherworks: " << leatherInvSwede;
- cout << endl;
- cout << "Fur: " << furInvSwede;
- cout << endl;
- cout << "Beer: " << beerInvSwede;
- cout << endl;
- cout << "Salt: " << saltInvSwede;
- cout << endl;
- cout << "Wine: " << wineInvSwede;
- cout << endl;
- }
- else if (country == "Poland"){
- cout << endl;
- cout << "Poland's Exports and Imports . . . ";
- cout << endl;
- cout << "Exports: Oil, Beer, Flour, Tools";
- cout << endl;
- cout << "Imports: Velvet, Iron, Spice, Pottery";
- cout << endl;
- // Checking . . .
- cout << "Poland's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvPol;
- cout << endl;
- cout << "Oil: " << oilInvPol;
- cout << endl;
- cout << "Fish: " << fishInvPol;
- cout << endl;
- cout << "Wool Cloth:" << woolInvPol;
- cout << endl;
- cout << "Velvet: " << velvetInvPol;
- cout << endl;
- cout << "Tools: " << toolsInvPol;
- cout << endl;
- cout << "Spice: " << spiceInvPol;
- cout << endl;
- cout << "Iron: " << ironInvPol;
- cout << endl;
- cout << "Flour: " << flourInvPol;
- cout << endl;
- cout << "Dyes: " << dyeInvPol;
- cout << endl;
- cout << "Leatherworks: " << leatherInvPol;
- cout << endl;
- cout << "Fur: " << furInvPol;
- cout << endl;
- cout << "Beer: " << beerInvPol;
- cout << endl;
- cout << "Salt: " << saltInvPol;
- cout << endl;
- cout << "Wine: " << wineInvPol;
- cout << endl;
- }
- else if (country == "Russia"){
- cout << endl;
- cout << "Russia's Exports and Imports . . . ";
- cout << endl;
- cout << "Exports: Furs, Dyes, Spice, Wool";
- cout << endl;
- cout << "Imports: Oil, Fish, Salt, Velvet, Flour, Pottery, Beer, Tools, Iron, Leatherworks";
- cout << endl;
- // Checking . . .
- cout << "Russia's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvRus;
- cout << endl;
- cout << "Oil: " << oilInvRus;
- cout << endl;
- cout << "Fish: " << fishInvRus;
- cout << endl;
- cout << "Wool Cloth:" << woolInvRus;
- cout << endl;
- cout << "Velvet: " << velvetInvRus;
- cout << endl;
- cout << "Tools: " << toolsInvRus;
- cout << endl;
- cout << "Spice: " << spiceInvRus;
- cout << endl;
- cout << "Iron: " << ironInvRus;
- cout << endl;
- cout << "Flour: " << flourInvRus;
- cout << endl;
- cout << "Dyes: " << dyeInvRus;
- cout << endl;
- cout << "Leatherworks: " << leatherInvRus;
- cout << endl;
- cout << "Fur: " << furInvRus;
- cout << endl;
- cout << "Beer: " << beerInvRus;
- cout << endl;
- cout << "Salt: " << saltInvRus;
- cout << endl;
- cout << "Wine: " << wineInvRus;
- cout << endl;
- }
- else if (country == "Crimea"){
- cout << endl;
- cout << "Crimea's Exports and Imports . . . ";
- cout << endl;
- cout << "Exports: Leatherworks, Salt, Wine";
- cout << endl;
- cout << "Imports: Iron, Oil, Beer";
- cout << endl;
- // Checking . . .
- cout << "Crimea's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvCri;
- cout << endl;
- cout << "Oil: " << oilInvCri;
- cout << endl;
- cout << "Fish: " << fishInvCri;
- cout << endl;
- cout << "Wool Cloth:" << woolInvCri;
- cout << endl;
- cout << "Velvet: " << velvetInvCri;
- cout << endl;
- cout << "Tools: " << toolsInvCri;
- cout << endl;
- cout << "Spice: " << spiceInvCri;
- cout << endl;
- cout << "Iron: " << ironInvCri;
- cout << endl;
- cout << "Flour: " << flourInvCri;
- cout << endl;
- cout << "Dyes: " << dyeInvCri;
- cout << endl;
- cout << "Leatherworks: " << leatherInvCri;
- cout << endl;
- cout << "Fur: " << furInvCri;
- cout << endl;
- cout << "Beer: " << beerInvCri;
- cout << endl;
- cout << "Salt: " << saltInvCri;
- cout << endl;
- cout << "Wine: " << wineInvCri;
- cout << endl;
- }
- else if (country == "Saudi"){
- cout << endl;
- cout << "Saudi Arabia's Exports and Imports . . . ";
- cout << endl;
- cout << "Exports: Salt, Pottery, Velvet";
- cout << endl;
- cout << "Imports: Flour, Beer, Fish";
- cout << endl;
- // Checking . . .
- cout << "Pottery: " << potInvSau;
- cout << endl;
- cout << "Oil: " << oilInvSau;
- cout << endl;
- cout << "Fish: " << fishInvSau;
- cout << endl;
- cout << "Wool Cloth:" << woolInvSau;
- cout << endl;
- cout << "Velvet: " << velvetInvSau;
- cout << endl;
- cout << "Tools: " << toolsInvSau;
- cout << endl;
- cout << "Spice: " << spiceInvSau;
- cout << endl;
- cout << "Iron: " << ironInvSau;
- cout << endl;
- cout << "Flour: " << flourInvSau;
- cout << endl;
- cout << "Dyes: " << dyeInvSau;
- cout << endl;
- cout << "Leatherworks: " << leatherInvSau;
- cout << endl;
- cout << "Fur: " << furInvSau;
- cout << endl;
- cout << "Beer: " << beerInvSau;
- cout << endl;
- cout << "Salt: " << saltInvSau;
- cout << endl;
- cout << "Wine: " << wineInvSau;
- cout << endl;
- }
- else if (country == "Ukraine"){
- cout << endl;
- cout << "Ukraine's exports and imports are slightly well-met . . . ";
- cout << endl;
- //For checking . . .
- cout << "Ukraine's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvUkr;
- cout << endl;
- cout << "Oil: " << oilInvUkr;
- cout << endl;
- cout << "Fish: " << fishInvUkr;
- cout << endl;
- cout << "Wool Cloth:" << woolInvUkr;
- cout << endl;
- cout << "Velvet: " << velvetInvUkr;
- cout << endl;
- cout << "Tools: " << toolsInvUkr;
- cout << endl;
- cout << "Spice: " << spiceInvUkr;
- cout << endl;
- cout << "Iron: " << ironInvUkr;
- cout << endl;
- cout << "Flour: " << flourInvUkr;
- cout << endl;
- cout << "Dyes: " << dyeInvUkr;
- cout << endl;
- cout << "Leatherworks: " << leatherInvUkr;
- cout << endl;
- cout << "Fur: " << furInvUkr;
- cout << endl;
- cout << "Beer: " << beerInvUkr;
- cout << endl;
- cout << "Salt: " << saltInvUkr;
- cout << endl;
- cout << "Wine: " << wineInvUkr;
- cout << endl;
- }
- else if (country == "China"){
- cout << endl;
- cout << "China's exports and imports are well-met . . . ";
- cout << endl;
- //For checking . . .
- cout << "China's Inventory . . . ";
- cout << endl;
- cout << "Pottery: " << potInvChi;
- cout << endl;
- cout << "Oil: " << oilInvChi;
- cout << endl;
- cout << "Fish: " << fishInvChi;
- cout << endl;
- cout << "Wool Cloth:" << woolInvChi;
- cout << endl;
- cout << "Velvet: " << velvetInvChi;
- cout << endl;
- cout << "Tools: " << toolsInvChi;
- cout << endl;
- cout << "Spice: " << spiceInvChi;
- cout << endl;
- cout << "Iron: " << ironInvChi;
- cout << endl;
- cout << "Flour: " << flourInvChi;
- cout << endl;
- cout << "Dyes: " << dyeInvChi;
- cout << endl;
- cout << "Leatherworks: " << leatherInvChi;
- cout << endl;
- cout << "Fur: " << furInvChi;
- cout << endl;
- cout << "Beer: " << beerInvChi;
- cout << endl;
- cout << "Salt: " << saltInvChi;
- cout << endl;
- cout << "Wine: " << wineInvChi;
- cout << endl;
- }
- else if (country == "None"){
- cout << "Input country notes: ";
- cin >> country;
- notes();
- }
- else{
- cout << "Input country notes: ";
- cin >> country;
- notes();
- }
- system("pause");
- if (mem2 == 1) trade();
- else if (mem2 == 2) buy();
- else if (mem2 == 3) sell();
- else if (mem2 == 4) quantity();
- else if (mem2 == 5) todo2();
- }
- //balance function
- void balance_balance(void){
- cout << endl;
- cout << setprecision(2) << fixed;
- cout << "Balance: Eur " << balance;
- cout << endl;
- }
- //todo function
- void todo(void){
- if (land == 0){
- cout << endl;
- cout << "You are now trading with Sweden ... ";
- cout << endl;
- todo2();
- }
- else if (land == 1){
- cout << endl;
- cout << "You are now trading with Poland ... ";
- cout << endl;
- todo2();
- }
- else if (land == 2){
- cout << endl;
- cout << "You are now trading with Russia ... ";
- cout << endl;
- todo2();
- }
- else if (land == 3){
- cout << endl;
- cout << "You are now trading with Crimea . . . ";
- cout << endl;
- todo2();
- }
- else if (land == 4){
- cout << endl;
- cout << "You are now trading with Saudi Arabia . . . ";
- cout << endl;
- todo2();
- }
- else if (land == 5){
- cout << endl;
- cout << "You are now trading with Ukraine . . . ";
- cout << endl;
- todo2();
- }
- else if (land == 6){
- cout << endl;
- cout << "You are now trading with China . . . ";
- cout << endl;
- todo2();
- }
- }
- //todo2 function
- void todo2(void){
- int x;
- country = "None";
- mem = 4;
- mem2 = 5;
- cout << endl;
- cout << "[1] Buy";
- cout << endl;
- cout << "[2] Sell";
- cout << endl;
- cout << "[3] Check inventory";
- cout << endl;
- cout << "[4] Check notes";
- cout << endl;
- cout << "[5] Return";
- cout << endl;
- string input;
- do {
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x){
- case 1:
- buy();
- break;
- case 2:
- sell();
- break;
- case 3:
- check();
- break;
- case 4:
- notes();
- break;
- case 5:
- trade();
- break;
- default:
- cout << "That's an invalid option. Please try again.";
- cout << endl;
- }
- } 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");
- }
- //country inventory
- void countryInv(void){
- if (land==0){
- //Buy
- //Buying pot
- if (goodType==0 && mem3==0){
- if (qty>potInvSwede){
- cout << "Sweden does not have " << qty << " pottery.";
- quantity();
- }
- else potInvSwede -= qty;
- }
- //Buying oil
- else if (goodType==1 && mem3==0){
- if (qty>oilInvSwede){
- cout << "Sweden does not have " << qty << " oil.";
- quantity();
- }
- else oilInvSwede -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvSwede){
- cout << "Sweden does not have " << qty << " fish.";
- quantity();
- }
- else fishInvSwede -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvSwede){
- cout << "Sweden does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvSwede -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvSwede){
- cout << "Sweden does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvSwede -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvSwede){
- cout << "Sweden does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvSwede -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvSwede){
- cout << "Sweden does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvSwede -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvSwede){
- cout << "Sweden does not have " << qty << " iron.";
- quantity();
- }
- else ironInvSwede -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvSwede){
- cout << "Sweden does not have " << qty << " flour.";
- quantity();
- }
- else flourInvSwede -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvSwede){
- cout << "Sweden does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvSwede -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvSwede){
- cout << "Sweden does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvSwede -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvSwede){
- cout << "Sweden does not have " << qty << " fur.";
- quantity();
- }
- else furInvSwede -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvSwede){
- cout << "Sweden does not have " << qty << " beer.";
- quantity();
- }
- else beerInvSwede -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvSwede){
- cout << "Sweden does not have " << qty << " salt.";
- quantity();
- }
- else saltInvSwede -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvSwede){
- cout << "Sweden does not have " << qty << " wine.";
- quantity();
- }
- else wineInvSwede -= qty;
- }
- //Sell
- //Selling pot
- if (goodType==0 && mem3==1){
- potInvSwede += qty;
- }
- //Selling oil
- else if (goodType==1 && mem3==1){
- oilInvSwede += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvSwede += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvSwede += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvSwede += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvSwede += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvSwede += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvSwede += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvSwede += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvSwede += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvSwede += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvSwede += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvSwede += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvSwede += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvSwede += qty;
- }
- }
- else if (land==1){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvPol){
- cout << "Poland does not have " << qty << " pottery.";
- quantity();
- }
- else potInvPol -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvPol){
- cout << "Poland does not have " << qty << " oil.";
- quantity();
- }
- else oilInvPol -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvPol){
- cout << "Poland does not have " << qty << " fish.";
- quantity();
- }
- else fishInvPol -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvPol){
- cout << "Poland does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvPol -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvPol){
- cout << "Poland does not have " << qty << " velvet.";
- quantity();
- }
- else oilInvPol -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvPol){
- cout << "Poland does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvPol -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvPol){
- cout << "Poland does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvPol -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvPol){
- cout << "Poland does not have " << qty << " iron.";
- quantity();
- }
- else ironInvPol -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvPol){
- cout << "Poland does not have " << qty << " flour.";
- quantity();
- }
- else flourInvPol -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvPol){
- cout << "Poland does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvPol -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvPol){
- cout << "Poland does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvPol -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvPol){
- cout << "Poland does not have " << qty << " fur.";
- quantity();
- }
- else furInvPol -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvPol){
- cout << "Poland does not have " << qty << " beer.";
- quantity();
- }
- else beerInvPol -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvPol){
- cout << "Poland does not have " << qty << " salt.";
- quantity();
- }
- else saltInvPol -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvPol){
- cout << "Poland does not have " << qty << " wine.";
- quantity();
- }
- else wineInvPol -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvPol += qty;
- }
- else if (goodType== 1 && mem3==1){
- oilInvPol += qty;
- }
- else if (goodType== 2 && mem3==1){
- fishInvPol += qty;
- }
- else if (goodType== 3 && mem3==1){
- woolInvPol += qty;
- }
- else if (goodType== 4 && mem3==1){
- velvetInvPol += qty;
- }
- else if (goodType== 5 && mem3==1){
- toolsInvPol += qty;
- }
- else if (goodType== 6 && mem3==1){
- spiceInvPol += qty;
- }
- else if (goodType== 7 && mem3==1){
- ironInvPol += qty;
- }
- else if (goodType== 8 && mem3==1){
- flourInvPol += qty;
- }
- else if (goodType== 9 && mem3==1){
- dyeInvPol += qty;
- }
- else if (goodType== 10 && mem3==1){
- leatherInvPol += qty;
- }
- else if (goodType== 11 && mem3==1){
- furInvPol += qty;
- }
- else if (goodType== 12 && mem3==1){
- beerInvPol += qty;
- }
- else if (goodType== 13 && mem3==1){
- saltInvPol += qty;
- }
- else if (goodType== 14 && mem3==1){
- wineInvPol += qty;
- }
- }
- else if (land==2){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvRus){
- cout << "Russia does not have " << qty << " pottery.";
- quantity();
- }
- else potInvRus -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvRus){
- cout << "Russia does not have " << qty << " oil.";
- quantity();
- }
- else oilInvRus -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvRus){
- cout << "Russia does not have " << qty << " fish.";
- quantity();
- }
- else fishInvRus -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvRus){
- cout << "Russia does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvRus -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvRus){
- cout << "Russia does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvRus -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvRus){
- cout << "Russia does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvRus -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvRus){
- cout << "Russia does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvRus -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvRus){
- cout << "Russia does not have " << qty << " iron.";
- quantity();
- }
- else ironInvRus -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvRus){
- cout << "Russia does not have " << qty << " flour.";
- quantity();
- }
- else flourInvRus -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvRus){
- cout << "Russia does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvRus -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvRus){
- cout << "Russia does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvRus -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvRus){
- cout << "Russia does not have " << qty << " fur.";
- quantity();
- }
- else furInvRus -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvRus){
- cout << "Russia does not have " << qty << " beer.";
- quantity();
- }
- else beerInvRus -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvRus){
- cout << "Russia does not have " << qty << "salt.";
- quantity();
- }
- else saltInvRus -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvRus){
- cout << "Russia does not have " << qty << " wine.";
- quantity();
- }
- else wineInvRus -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvRus += qty;
- }
- else if (goodType==1 && mem3==1){
- oilInvRus += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvRus += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvRus += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvRus += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvRus += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvRus += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvRus += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvRus += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvRus += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvRus += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvRus += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvRus += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvRus += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvRus += qty;
- }
- }
- else if (land==3){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvCri){
- cout << "Crimea does not have " << qty << " pottery.";
- quantity();
- }
- else potInvCri -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvCri){
- cout << "Crimea does not have " << qty << " oil.";
- quantity();
- }
- else oilInvCri -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvCri){
- cout << "Crimea does not have " << qty << " fish.";
- quantity();
- }
- else fishInvCri -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvCri){
- cout << "Crimea does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvCri -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvCri){
- cout << "Crimea does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvCri -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvCri){
- cout << "Crimea does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvCri -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvCri){
- cout << "Crimea does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvCri -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvCri){
- cout << "Crimea does not have " << qty << " iron.";
- quantity();
- }
- else ironInvCri -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvCri){
- cout << "Crimea does not have " << qty << " flour.";
- quantity();
- }
- else flourInvCri -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvCri){
- cout << "Crimea does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvCri -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvCri){
- cout << "Crimea does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvCri -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvCri){
- cout << "Crimea does not have " << qty << " fur.";
- quantity();
- }
- else furInvCri -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvCri){
- cout << "Crimea does not have " << qty << " beer.";
- quantity();
- }
- else beerInvCri -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvCri){
- cout << "Crimea does not have " << qty << "salt.";
- quantity();
- }
- else saltInvCri -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvCri){
- cout << "Crimea does not have " << qty << " wine.";
- quantity();
- }
- else wineInvCri -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvCri += qty;
- }
- else if (goodType==1 && mem3==1){
- oilInvCri += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvCri += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvCri += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvCri += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvCri += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvCri += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvCri += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvCri += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvCri += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvCri += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvCri += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvCri += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvCri += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvCri += qty;
- }
- }
- else if (land==4){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvSau){
- cout << "Saudi Arabia does not have " << qty << " pottery.";
- quantity();
- }
- else potInvSau -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvSau){
- cout << "Saudi Arabia does not have " << qty << " oil.";
- quantity();
- }
- else oilInvSau -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvSau){
- cout << "Saudi Arabia does not have " << qty << " fish.";
- quantity();
- }
- else fishInvSau -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvSau){
- cout << "Saudi Arabia does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvSau -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvSau){
- cout << "Saudi Arabia does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvSau -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvSau){
- cout << "Saudi Arabia does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvSau -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvSau){
- cout << "Saudi Arabia does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvSau -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvSau){
- cout << "Saudi Arabia does not have " << qty << " iron.";
- quantity();
- }
- else ironInvSau -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvSau){
- cout << "Saudi Arabia does not have " << qty << " flour.";
- quantity();
- }
- else flourInvSau -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvSau){
- cout << "Saudi Arabia does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvSau -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvSau){
- cout << "Saudi Arabia does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvSau -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvSau){
- cout << "Saudi Arabia does not have " << qty << " fur.";
- quantity();
- }
- else furInvSau -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvSau){
- cout << "Saudi Arabia does not have " << qty << " beer.";
- quantity();
- }
- else beerInvSau -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvSau){
- cout << "Saudi Arabia does not have " << qty << " salt.";
- quantity();
- }
- else saltInvSau -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvSau){
- cout << "Saudi Arabia does not have " << qty << " wine.";
- quantity();
- }
- else wineInvSau -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvSau += qty;
- }
- else if (goodType==1 && mem3==1){
- oilInvSau += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvSau += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvSau += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvSau += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvSau += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvSau += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvSau += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvSau += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvSau += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvSau += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvSau += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvSau += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvSau += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvSau += qty;
- }
- }
- else if (land==5){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvUkr){
- cout << "Ukraine does not have " << qty << " pottery.";
- quantity();
- }
- else potInvUkr -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvUkr){
- cout << "Ukraine does not have " << qty << " oil.";
- quantity();
- }
- else oilInvUkr -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvUkr){
- cout << "Ukraine does not have " << qty << " fish.";
- quantity();
- }
- else fishInvUkr -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvUkr){
- cout << "Ukraine does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvUkr -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvUkr){
- cout << "Ukraine does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvUkr -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvUkr){
- cout << "Ukraine does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvUkr -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvUkr){
- cout << "Ukraine does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvUkr -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvUkr){
- cout << "Ukraine does not have " << qty << " iron.";
- quantity();
- }
- else ironInvUkr -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvUkr){
- cout << "Ukraine does not have " << qty << " flour.";
- quantity();
- }
- else flourInvUkr -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvUkr){
- cout << "Ukraine does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvUkr -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvUkr){
- cout << "Ukraine does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvUkr -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvUkr){
- cout << "Ukraine does not have " << qty << " fur.";
- quantity();
- }
- else furInvUkr -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvUkr){
- cout << "Ukraine does not have " << qty << " beer.";
- quantity();
- }
- else beerInvUkr -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvUkr){
- cout << "Ukraine does not have " << qty << " salt.";
- quantity();
- }
- else saltInvUkr -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvUkr){
- cout << "Ukraine does not have " << qty << " wine.";
- quantity();
- }
- else wineInvUkr -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvUkr += qty;
- }
- else if (goodType==1 && mem3==1){
- oilInvUkr += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvUkr += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvUkr += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvUkr += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvUkr += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvUkr += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvUkr += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvUkr += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvUkr += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvUkr += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvUkr += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvUkr += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvUkr += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvUkr += qty;
- }
- }
- else if (land==6){
- //Buy
- if (goodType==0 && mem3==0){
- if (qty>potInvChi){
- cout << "China does not have " << qty << " pottery.";
- quantity();
- }
- else potInvChi -= qty;
- }
- else if (goodType==1 && mem3==0){
- if (qty>oilInvChi){
- cout << "China does not have " << qty << " oil.";
- quantity();
- }
- else oilInvChi -= qty;
- }
- else if (goodType==2 && mem3==0){
- if (qty>fishInvChi){
- cout << "China does not have " << qty << " fish.";
- quantity();
- }
- else fishInvChi -= qty;
- }
- else if (goodType==3 && mem3==0){
- if (qty>woolInvChi){
- cout << "China does not have " << qty << " wool cloth.";
- quantity();
- }
- else woolInvChi -= qty;
- }
- else if (goodType==4 && mem3==0){
- if (qty>velvetInvChi){
- cout << "China does not have " << qty << " velvet.";
- quantity();
- }
- else velvetInvChi -= qty;
- }
- else if (goodType==5 && mem3==0){
- if (qty>toolsInvChi){
- cout << "China does not have " << qty << " tools.";
- quantity();
- }
- else toolsInvChi -= qty;
- }
- else if (goodType==6 && mem3==0){
- if (qty>spiceInvChi){
- cout << "China does not have " << qty << " spice.";
- quantity();
- }
- else spiceInvChi -= qty;
- }
- else if (goodType==7 && mem3==0){
- if (qty>ironInvChi){
- cout << "China does not have " << qty << " iron.";
- quantity();
- }
- else ironInvChi -= qty;
- }
- else if (goodType==8 && mem3==0){
- if (qty>flourInvChi){
- cout << "China does not have " << qty << " flour.";
- quantity();
- }
- else flourInvChi -= qty;
- }
- else if (goodType==9 && mem3==0){
- if (qty>dyeInvChi){
- cout << "China does not have " << qty << " dyes.";
- quantity();
- }
- else dyeInvChi -= qty;
- }
- else if (goodType==10 && mem3==0){
- if (qty>leatherInvChi){
- cout << "China does not have " << qty << " leatherworks.";
- quantity();
- }
- else leatherInvChi -= qty;
- }
- else if (goodType==11 && mem3==0){
- if (qty>furInvChi){
- cout << "China does not have " << qty << " fur.";
- quantity();
- }
- else furInvChi -= qty;
- }
- else if (goodType==12 && mem3==0){
- if (qty>beerInvChi){
- cout << "China does not have " << qty << " beer.";
- quantity();
- }
- else beerInvChi -= qty;
- }
- else if (goodType==13 && mem3==0){
- if (qty>saltInvChi){
- cout << "China does not have " << qty << " salt.";
- quantity();
- }
- else saltInvChi -= qty;
- }
- else if (goodType==14 && mem3==0){
- if (qty>wineInvChi){
- cout << "China does not have " << qty << " wine.";
- quantity();
- }
- else wineInvChi -= qty;
- }
- //Sell
- else if (goodType==0 && mem3==1){
- potInvChi += qty;
- }
- else if (goodType==1 && mem3==1){
- oilInvChi += qty;
- }
- else if (goodType==2 && mem3==1){
- fishInvChi += qty;
- }
- else if (goodType==3 && mem3==1){
- woolInvChi += qty;
- }
- else if (goodType==4 && mem3==1){
- velvetInvChi += qty;
- }
- else if (goodType==5 && mem3==1){
- toolsInvChi += qty;
- }
- else if (goodType==6 && mem3==1){
- spiceInvChi += qty;
- }
- else if (goodType==7 && mem3==1){
- ironInvChi += qty;
- }
- else if (goodType==8 && mem3==1){
- flourInvChi += qty;
- }
- else if (goodType==9 && mem3==1){
- dyeInvChi += qty;
- }
- else if (goodType==10 && mem3==1){
- leatherInvChi += qty;
- }
- else if (goodType==11 && mem3==1){
- furInvChi += qty;
- }
- else if (goodType==12 && mem3==1){
- beerInvChi += qty;
- }
- else if (goodType==13 && mem3==1){
- saltInvChi += qty;
- }
- else if (goodType==14 && mem3==1){
- wineInvChi += qty;
- }
- }
- }
- //random function
- void random(void){
- goodType = 0;
- for (int i = 1; i <= 15; i++){
- if (goodType == 0){
- if (land == 0){
- inv_Country = potInvSwede;
- }
- else if (land == 1){
- inv_Country = potInvPol;
- }
- else if (land == 2){
- inv_Country = potInvRus;
- }
- else if (land == 3){
- inv_Country = potInvCri;
- }
- else if (land == 4){
- inv_Country = potInvSau;
- }
- else if (land == 5){
- inv_Country = potInvUkr;
- }
- else if (land == 6){
- inv_Country = potInvChi;
- }
- if (inv_Country >= 76 && inv_Country <= 100){
- price = potPrice[land] + randomnum * 1;
- }
- else if (inv_Country >= 51 && inv_Country <= 75){
- price = potPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 26 && inv_Country <= 50){
- price = potPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 25){
- price = potPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 100){
- price = potPrice[land] * 0.5 + randomnum;
- }
- priceArrays[0] = price;
- }
- else if (goodType == 1){
- if (land == 0){
- inv_Country = oilInvSwede;
- }
- else if (land == 1){
- inv_Country = oilInvPol;
- }
- else if (land == 2){
- inv_Country = oilInvRus;
- }
- //changes
- else if (land == 3){
- inv_Country = oilInvCri;
- }
- else if (land == 4){
- inv_Country = oilInvSau;
- }
- else if (land == 5){
- inv_Country = oilInvUkr;
- }
- else if (land == 6){
- inv_Country = oilInvChi;
- }
- if (inv_Country >= 38 && inv_Country <= 50){
- price = oilPrice[land] + randomnum;
- }
- else if (inv_Country >= 26 && inv_Country <= 37){
- price = oilPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 13 && inv_Country <= 25){
- price = oilPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 12){
- price = oilPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 50){
- price = oilPrice[land] * 0.75 + randomnum;
- }
- priceArrays[1] = price;
- }
- else if (goodType == 2){
- if (land == 0){
- inv_Country = fishInvSwede;
- }
- else if (land == 1){
- inv_Country = fishInvPol;
- }
- else if (land == 2){
- inv_Country = fishInvRus;
- }
- else if (land == 3){
- inv_Country = fishInvCri;
- }
- else if (land == 4){
- inv_Country = fishInvSau;
- }
- else if (land == 5){
- inv_Country = fishInvUkr;
- }
- else if (land == 6){
- inv_Country = fishInvChi;
- }
- if (inv_Country >= 114 && inv_Country <= 150){
- price = fishPrice[land] + randomnum;
- }
- else if (inv_Country >= 76 && inv_Country <= 113){
- price = fishPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 39 && inv_Country <= 75){
- price = fishPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 38){
- price = fishPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 150){
- price = fishPrice[land] * 0.75 + randomnum;
- }
- priceArrays[2] = price;
- }
- else if (goodType == 3){
- if (land == 0){
- inv_Country = woolInvSwede;
- }
- else if (land == 1){
- inv_Country = woolInvPol;
- }
- else if (land == 2){
- inv_Country = woolInvRus;
- }
- else if (land == 3){
- inv_Country = woolInvCri;
- }
- else if (land == 4){
- inv_Country = woolInvSau;
- }
- else if (land == 5){
- inv_Country = woolInvUkr;
- }
- else if (land == 6){
- inv_Country = woolInvChi;
- }
- if (inv_Country >= 38 && inv_Country <= 75){
- price = woolPrice[land] + randomnum;
- }
- else if (inv_Country >= 26 && inv_Country <= 56){
- price = woolPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 13 && inv_Country <= 38){
- price = woolPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 12){
- price = woolPrice[land] * 2 + randomnum;
- }
- else if (inv_Country < 75){
- price = woolPrice[land] * 0.75 + randomnum;
- }
- priceArrays[3] = price;
- }
- else if (goodType == 4){
- if (land == 0){
- inv_Country = velvetInvSwede;
- }
- else if (land == 1){
- inv_Country = velvetInvPol;
- }
- else if (land == 2){
- inv_Country = velvetInvRus;
- }
- else if (land == 3){
- inv_Country = velvetInvCri;
- }
- else if (land == 4){
- inv_Country = velvetInvSau;
- }
- else if (land == 5){
- inv_Country = velvetInvUkr;
- }
- else if (land == 6){
- inv_Country = velvetInvChi;
- }
- if (inv_Country >= 20 && inv_Country <= 25){
- price = velvetPrice[land] + randomnum;
- }
- else if (inv_Country >= 14 && inv_Country <= 19){
- price = velvetPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 8 && inv_Country <= 13){
- price = velvetPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 7){
- price = velvetPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 25){
- price = velvetPrice[land] * 0.75 + randomnum;
- }
- priceArrays[4] = price;
- }
- else if (goodType == 5){
- if (land == 0){
- inv_Country = toolsInvSwede;
- }
- else if (land == 1){
- inv_Country = toolsInvPol;
- }
- else if (land == 2){
- inv_Country = toolsInvRus;
- }
- else if (land == 3){
- inv_Country = toolsInvCri;
- }
- else if (land == 4){
- inv_Country = toolsInvSau;
- }
- else if (land == 5){
- inv_Country = toolsInvUkr;
- }
- else if (land == 6){
- inv_Country = toolsInvChi;
- }
- if (inv_Country >= 38 && inv_Country <= 50){
- price = toolsPrice[land] + randomnum;
- if (land == 6){
- if (price < 0){
- price *= -1;
- }
- price += 350;
- }
- }
- else if (inv_Country >= 26 && inv_Country <= 37){
- price = toolsPrice[land] * 1.25 + randomnum;
- if (land == 6){
- if (price < 0){
- price *= -1;
- }
- price += 350;
- }
- }
- else if (inv_Country >= 13 && inv_Country <= 25){
- price = toolsPrice[land] * 1.50 + randomnum;
- if (land == 6){
- if (price < 0){
- price *= -1;
- }
- price += 350;
- }
- }
- else if (inv_Country <= 12){
- price = toolsPrice[land] * 2 + randomnum;
- if (land == 6){
- if (price < 0){
- price *= -1;
- }
- price += 350;
- }
- }
- else if (inv_Country > 50){
- price = toolsPrice[land] * 0.75 + randomnum;
- if (land == 6){
- if (price < 0){
- price *= -1;
- }
- price += 350;
- }
- }
- priceArrays[5] = price;
- }
- else if (goodType == 6){
- if (land == 0){
- inv_Country = spiceInvSwede;
- }
- else if (land == 1){
- inv_Country = spiceInvPol;
- }
- else if (land == 2){
- inv_Country = spiceInvRus;
- }
- else if (land == 3){
- inv_Country = spiceInvCri;
- }
- else if (land == 4){
- inv_Country = spiceInvSau;
- }
- else if (land == 5){
- inv_Country = spiceInvUkr;
- }
- else if (land == 6){
- inv_Country = spiceInvChi;
- }
- if (inv_Country >= 24 && inv_Country <= 30){
- price = spicePrice[land] + randomnum;
- }
- else if (inv_Country >= 16 && inv_Country <= 23){
- price = spicePrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 9 && inv_Country <= 15){
- price = spicePrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 8){
- price = spicePrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 30){
- price = spicePrice[land] * 0.75 + randomnum;
- }
- priceArrays[6] = price;
- }
- else if (goodType == 7){
- if (land == 0){
- inv_Country = ironInvSwede;
- }
- else if (land == 1){
- inv_Country = ironInvPol;
- }
- else if (land == 2){
- inv_Country = ironInvRus;
- }
- else if (land == 3){
- inv_Country = ironInvCri;
- }
- else if (land == 4){
- inv_Country = ironInvSau;
- }
- else if (land == 5){
- inv_Country = ironInvUkr;
- }
- else if (land == 6){
- inv_Country = ironInvChi;
- }
- if (inv_Country >= 76 && inv_Country <= 100){
- price = ironPrice[land] + randomnum;
- }
- else if (inv_Country >= 51 && inv_Country <= 75){
- price = ironPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 26 && inv_Country <= 50){
- price = ironPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 25){
- price = ironPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 100){
- price = ironPrice[land] * 0.75 + randomnum;
- }
- priceArrays[7] = price;
- }
- else if (goodType == 8){
- if (land == 0){
- inv_Country = flourInvSwede;
- }
- else if (land == 1){
- inv_Country = flourInvPol;
- }
- else if (land == 2){
- inv_Country = flourInvRus;
- }
- else if (land == 3){
- inv_Country = flourInvCri;
- }
- else if (land == 4){
- inv_Country = flourInvSau;
- }
- else if (land == 5){
- inv_Country = flourInvUkr;
- }
- else if (land == 6){
- inv_Country = flourInvChi;
- }
- if (inv_Country >= 114 && inv_Country <= 150){
- price = flourPrice[land] + randomnum;
- }
- else if (inv_Country >= 76 && inv_Country <= 113){
- price = flourPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 39 && inv_Country <= 75){
- price = flourPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 38){
- price = flourPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 150){
- price = flourPrice[land] * 0.75 + randomnum;
- }
- priceArrays[8] = price;
- }
- else if (goodType == 9){
- if (land == 0){
- inv_Country = dyeInvSwede;
- }
- else if (land == 1){
- inv_Country = dyeInvPol;
- }
- else if (land == 2){
- inv_Country = dyeInvRus;
- }
- else if (land == 3){
- inv_Country = dyeInvCri;
- }
- else if (land == 4){
- inv_Country = dyeInvSau;
- }
- else if (land == 5){
- inv_Country = dyeInvUkr;
- }
- else if (land == 6){
- inv_Country = dyeInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = dyePrice[land] + randomnum;
- }
- else if (inv_Country >= 40 && inv_Country <= 56){
- price = dyePrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 39){
- price = dyePrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = dyePrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 75){
- price = dyePrice[land] * 0.75 + randomnum;
- }
- priceArrays[9] = price;
- }
- else if (goodType == 10){
- if (land == 0){
- inv_Country = leatherInvSwede;
- }
- else if (land == 1){
- inv_Country = leatherInvPol;
- }
- else if (land == 2){
- inv_Country = leatherInvRus;
- }
- else if (land == 3){
- inv_Country = leatherInvCri;
- }
- else if (land == 4){
- inv_Country = leatherInvSau;
- }
- else if (land == 5){
- inv_Country = leatherInvUkr;
- }
- else if (land == 6){
- inv_Country = leatherInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = leatherPrice[land] + randomnum;
- }
- else if (inv_Country >= 39 && inv_Country <= 56){
- price = leatherPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 38){
- price = leatherPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = leatherPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 75){
- price = leatherPrice[land] * 0.75 + randomnum;
- }
- priceArrays[10] = price;
- }
- else if (goodType == 11){
- if (land == 0){
- inv_Country = furInvSwede;
- }
- else if (land == 1){
- inv_Country = furInvPol;
- }
- else if (land == 2){
- inv_Country = furInvRus;
- }
- else if (land == 3){
- inv_Country = furInvCri;
- }
- else if (land == 4){
- inv_Country = furInvSau;
- }
- else if (land == 5){
- inv_Country = furInvUkr;
- }
- else if (land == 6){
- inv_Country = furInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = furPrice[land] + randomnum;
- }
- else if (inv_Country >= 40 && inv_Country <= 56){
- price = furPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 39){
- price = furPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = furPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 75){
- price = furPrice[land] * 0.75 + randomnum;
- }
- priceArrays[11] = price;
- }
- else if (goodType == 12){
- if (land == 0){
- inv_Country = beerInvSwede;
- }
- else if (land == 1){
- inv_Country = beerInvPol;
- }
- else if (land == 2){
- inv_Country = beerInvRus;
- }
- else if (land == 3){
- inv_Country = beerInvCri;
- }
- else if (land == 4){
- inv_Country = beerInvSau;
- }
- else if (land == 5){
- inv_Country = beerInvUkr;
- }
- else if (land == 6){
- inv_Country = beerInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = beerPrice[land] + randomnum;
- }
- else if (inv_Country >= 40 && inv_Country <= 56){
- price = beerPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 39){
- price = beerPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = beerPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 75){
- price = beerPrice[land] * 0.75 + randomnum;
- }
- priceArrays[12] = price;
- }else if (goodType == 13){
- if (land == 0){
- inv_Country = saltInvSwede;
- }
- else if (land == 1){
- inv_Country = saltInvPol;
- }
- else if (land == 2){
- inv_Country = saltInvRus;
- }
- else if (land == 3){
- inv_Country = saltInvCri;
- }
- else if (land == 4){
- inv_Country = saltInvSau;
- }
- else if (land == 5){
- inv_Country = saltInvUkr;
- }
- else if (land == 6){
- inv_Country = saltInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = saltPrice[land] + randomnum;
- }
- else if (inv_Country >= 40 && inv_Country <= 56){
- price = saltPrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 39){
- price = saltPrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = saltPrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 50){
- price = saltPrice[land] * 0.75 + randomnum;
- }
- priceArrays[13] = price;
- }
- else if (goodType == 14){
- if (land == 0){
- inv_Country = wineInvSwede;
- }
- else if (land == 1){
- inv_Country = wineInvPol;
- }
- else if (land == 2){
- inv_Country = wineInvRus;
- }
- else if (land == 3){
- inv_Country = wineInvCri;
- }
- else if (land == 4){
- inv_Country = wineInvSau;
- }
- else if (land == 5){
- inv_Country = wineInvUkr;
- }
- else if (land == 6){
- inv_Country = wineInvChi;
- }
- if (inv_Country >= 57 && inv_Country <= 75){
- price = winePrice[land] + randomnum;
- }
- else if (inv_Country >= 40 && inv_Country <= 56){
- price = winePrice[land] * 1.25 + randomnum;
- }
- else if (inv_Country >= 20 && inv_Country <= 39){
- price = winePrice[land] * 1.50 + randomnum;
- }
- else if (inv_Country <= 19){
- price = winePrice[land] * 2 + randomnum;
- }
- else if (inv_Country > 75){
- price = winePrice[land] * 0.75 + randomnum;
- }
- priceArrays[14] = price;
- }
- cout << "[" << i << "] " << tradeGoods[goodType] << " - Eur " << price;
- cout << endl;
- goodType++;
- }
- }
- float random(float x){
- srand(time(0));
- x = rand() % 20 + (-20);
- return x;
- }
- //inv country function
- void determineCountry(void){
- if (land == 0){
- if (goodType == 0) inv_Country = potInvSwede;
- // //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;
- else if (goodType == 1) inv_Country = oilInvSwede;
- //addition
- else if (goodType == 2) inv_Country = fishInvSwede;
- else if (goodType == 3) inv_Country = woolInvSwede;
- else if (goodType == 4) inv_Country = velvetInvSwede;
- else if (goodType == 5) inv_Country = toolsInvSwede;
- else if (goodType == 6) inv_Country = spiceInvSwede;
- else if (goodType == 7) inv_Country = ironInvSwede;
- else if (goodType == 8) inv_Country = flourInvSwede;
- else if (goodType == 9) inv_Country = dyeInvSwede;
- else if (goodType == 10) inv_Country = leatherInvSwede;
- else if (goodType == 11) inv_Country = furInvSwede;
- else if (goodType == 12) inv_Country = beerInvSwede;
- else if (goodType == 13) inv_Country = saltInvSwede;
- else if (goodType == 14) inv_Country = wineInvSwede;
- }
- else if (land == 1){
- if (goodType == 0) inv_Country = potInvPol;
- else if (goodType == 1) inv_Country = oilInvPol;
- else if (goodType == 2) inv_Country = fishInv;
- else if (goodType == 3) inv_Country = woolInvPol;
- else if (goodType == 4) inv_Country = velvetInvPol;
- else if (goodType == 5) inv_Country = toolsInvPol;
- else if (goodType == 6) inv_Country = spiceInvPol;
- else if (goodType == 7) inv_Country = ironInvPol;
- else if (goodType == 8) inv_Country = flourInvPol;
- else if (goodType == 9) inv_Country = dyeInvPol;
- else if (goodType == 10) inv_Country = leatherInvPol;
- else if (goodType == 11) inv_Country = furInvPol;
- else if (goodType == 12) inv_Country = beerInvPol;
- else if (goodType == 13) inv_Country = saltInvPol;
- else if (goodType == 14) inv_Country = wineInvPol;
- }
- else if (land == 2){
- if (goodType == 0) inv_Country = potInvRus;
- else if (goodType == 1) inv_Country = oilInvRus;
- else if (goodType == 2) inv_Country = fishInvRus;
- else if (goodType == 3) inv_Country = woolInvRus;
- else if (goodType == 4) inv_Country = velvetInvRus;
- else if (goodType == 5) inv_Country = toolsInvRus;
- else if (goodType == 6) inv_Country = spiceInvRus;
- else if (goodType == 7) inv_Country = ironInvRus;
- else if (goodType == 8) inv_Country = flourInvRus;
- else if (goodType == 9) inv_Country = dyeInvRus;
- else if (goodType == 10) inv_Country = leatherInvRus;
- else if (goodType == 11) inv_Country = furInvRus;
- else if (goodType == 12) inv_Country = beerInvRus;
- else if (goodType == 13) inv_Country = saltInvRus;
- else if (goodType == 14) inv_Country = wineInvRus;
- }
- //changes
- else if (land == 3){
- if (goodType == 0) inv_Country = potInvCri;
- else if (goodType == 1) inv_Country = oilInvCri;
- else if (goodType == 2) inv_Country = fishInvCri;
- else if (goodType == 3) inv_Country = woolInvCri;
- else if (goodType == 4) inv_Country = velvetInvCri;
- else if (goodType == 5) inv_Country = toolsInvCri;
- else if (goodType == 6) inv_Country = spiceInvCri;
- else if (goodType == 7) inv_Country = ironInvCri;
- else if (goodType == 8) inv_Country = flourInvCri;
- else if (goodType == 9) inv_Country = dyeInvCri;
- else if (goodType == 10) inv_Country = leatherInvCri;
- else if (goodType == 11) inv_Country = furInvCri;
- else if (goodType == 12) inv_Country = beerInvCri;
- else if (goodType == 13) inv_Country = saltInvCri;
- else if (goodType == 14) inv_Country = wineInvCri;
- }
- else if (land == 4){
- if (goodType == 0) inv_Country = potInvSau;
- else if (goodType == 1) inv_Country = oilInvSau;
- else if (goodType == 2) inv_Country = fishInvSau;
- else if (goodType == 3) inv_Country = woolInvSau;
- else if (goodType == 4) inv_Country = velvetInvSau;
- else if (goodType == 5) inv_Country = toolsInvSau;
- else if (goodType == 6) inv_Country = spiceInvSau;
- else if (goodType == 7) inv_Country = ironInvSau;
- else if (goodType == 8) inv_Country = flourInvSau;
- else if (goodType == 9) inv_Country = dyeInvSau;
- else if (goodType == 10) inv_Country = leatherInvSau;
- else if (goodType == 11) inv_Country = furInvSau;
- else if (goodType == 12) inv_Country = beerInvSau;
- else if (goodType == 13) inv_Country = saltInvSau;
- else if (goodType == 14) inv_Country = wineInvSau;
- }
- else if (land == 5){
- if (goodType == 0) inv_Country = potInvUkr;
- else if (goodType == 1) inv_Country = oilInvUkr;
- else if (goodType == 2) inv_Country = fishInvUkr;
- else if (goodType == 3) inv_Country = woolInvUkr;
- else if (goodType == 4) inv_Country = velvetInvUkr;
- else if (goodType == 5) inv_Country = toolsInvUkr;
- else if (goodType == 6) inv_Country = spiceInvUkr;
- else if (goodType == 7) inv_Country = ironInvUkr;
- else if (goodType == 8) inv_Country = flourInvUkr;
- else if (goodType == 9) inv_Country = dyeInvUkr;
- else if (goodType == 10) inv_Country = leatherInvUkr;
- else if (goodType == 11) inv_Country = furInvUkr;
- else if (goodType == 12) inv_Country = beerInvUkr;
- else if (goodType == 13) inv_Country = saltInvUkr;
- else if (goodType == 14) inv_Country = wineInvUkr;
- }
- else if (land == 6){
- if (goodType == 0) inv_Country = potInvChi;
- else if (goodType == 1) inv_Country = oilInvChi;
- else if (goodType == 2) inv_Country = fishInvChi;
- else if (goodType == 3) inv_Country = woolInvChi;
- else if (goodType == 4) inv_Country = velvetInvChi;
- else if (goodType == 5) inv_Country = toolsInvChi;
- else if (goodType == 6) inv_Country = spiceInvChi;
- else if (goodType == 7) inv_Country = ironInvChi;
- else if (goodType == 8) inv_Country = flourInvChi;
- else if (goodType == 9) inv_Country = dyeInvChi;
- else if (goodType == 10) inv_Country = leatherInvChi;
- else if (goodType == 11) inv_Country = furInvChi;
- else if (goodType == 12) inv_Country = beerInvChi;
- else if (goodType == 13) inv_Country = saltInvChi;
- else if (goodType == 14) inv_Country = wineInvChi;
- }
- }
- void eventsNumbers(void)
- {
- srand(time(0));
- int randomEvent;
- if (turn<=10)
- {randomEvent=rand()%10+1;
- events(randomEvent);}
- else if (turn>=11&&turn<=20)
- {randomEvent=rand()%20+1;
- events(randomEvent);}
- else if (turn>=21&&turn<=30)
- {randomEvent=rand()%30+1;
- events(randomEvent);}
- else if (turn>=31&&turn<=40)
- {randomEvent=rand()%40+1;
- events(randomEvent);}
- else if (turn>=41&&turn<=50)
- {randomEvent=rand()%50+1;
- events(randomEvent);}
- }
- void events(int random)
- {
- int x;
- switch (random){
- case 1:
- 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;
- if(GOOJcard>=1)
- {
- cout << "Turns out you have that get out of jail card . . . ";
- cout << endl << "You can only get so lucky." << endl;
- GOOJcard--;
- }
- else
- {
- turn++;
- balance=balance-2000;
- }
- break;
- case 3:
- cout<<"Psst! Someone just handed you a lucky card!"<<endl;
- GOOJcard=1;
- break;
- case 5:
- cout<<"The company's stocks gambit paid off! Your company saw fit to give you extra money for trading goods. Receive Eur 1000."<<endl;
- balance=balance+1000;
- break;
- case 7:
- cout<<"The company thought that your performance was astounding. Receive Eur 500 for trading."<<endl;
- balance=balance+500;
- break;
- case 9:
- cout<<"Your company wants to use the money from trading for other assets. Lose Eur 1500."<<endl;
- balance=balance-1500;
- break;
- case 11:
- cout<<"It's tax season! Lose a percentage of your trading balance based on the number of goods in Inventory."<<endl;
- balance=balance-(potInv*160*0.075+oilInv*400*0.075);
- break;
- case 13:
- cout<<"You go to jail! Skip a turn and lose Eur 2000."<<endl;
- if(GOOJcard>=1)
- {
- cout<<"Turns out you have that get out of jail card . . . .” << endl << “You can only get so lucky."<<endl;
- GOOJcard--;
- }
- else
- {
- turn++;
- balance=balance-2000;
- }
- break;
- case 15:
- cout<<"The company uses your trading balance to pay its debt. Lose half of your trading balance."<<endl;
- balance=balance/2;
- break;
- case 17:
- cout<<"The company's data was attacked by encryption virus. You lose half of your trading money to pay for ransomware."<<endl;
- balance=balance/2;
- break;
- case 19:
- cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
- balance=balance-1000;
- investment++;
- break;
- case 21:
- cout<<"One of the cargo ships got lost in the transit! Lose Eur 7000."<<endl;
- balance-=7000;
- break;
- case 23:
- 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;
- if(GOOJcard>=1)
- {
- cout<<"Turns out you have that get out of jail card . . . .” << endl << “You can only get so lucky."<<endl;
- GOOJcard--;
- }
- else
- {
- turn++;
- balance=balance-2000;
- }
- break;
- case 25:
- cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
- balance=balance-1000;
- investment++;
- break;
- case 27:
- if(investment>=4)
- {
- cout<<"The company's investment paid off! Receive Eur 10000."<<endl;
- balance+=10000;
- }
- else
- {
- cout<<"The company's investment failed. Along with the few assets you gave them! Lose Eur 2000."<<endl;
- balance-=2000;
- }
- break;
- case 29:
- cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose Eur 5000."<<endl;
- balance-=5000;
- break;
- case 31:
- cout<<"The stakes are getting higher, you need more money. Receive 50% added more trading money."<<endl;
- balance=balance*1.5;
- break;
- case 33:
- 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;
- if(GOOJcard>=1)
- {
- 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;
- GOOJcard--;
- }
- else
- {
- turn++;
- balance=balance-2000;
- }
- break;
- case 35:
- if (event35==0)
- {
- 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;
- do {
- cout << "Enter Input: ";
- cin >> input;
- stringstream(input) >> x;
- switch (x){
- case 1:
- cout<<"Thank you for your patronage. We will not forget this.";
- Cauldron++;
- break;
- case 2:
- cout<<"I see . . . I hope you don't regret your decision.";
- break;
- default:
- cout<<"Invalid input. Please try again.";
- break;
- }
- break;
- } while (input != "1" || input != "2");
- event35=1;
- }
- else
- {
- cout<<"A strange wind flows today. Had something changed?";
- break;
- }
- break;
- case 37:
- cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
- balance=balance-1000;
- investment++;
- break;
- case 39:
- cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose €5000."<<endl;
- balance-=5000;
- break;
- case 41:
- cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose €5000."<<endl;
- balance-=5000;
- case 43:
- cout<<"You invested in a certain stock. Something may come out of this . . . Lose Eur 1000."<<endl;
- balance=balance-1000;
- investment++;
- break;
- case 45:
- cout<<"A corporation tried a hostile takeover! You managed to drive them off, but at what cost? Lose Eur 5000."<<endl;
- balance-=5000;
- case 47:
- cout<<"The company invested in a certain stock. The company used your trading money . . . Lose Eur 1000."<<endl;
- balance=balance-1000;
- investment++;
- break;
- case 49:
- if(Cauldron==1)
- {
- cout<<"All of a sudden, the company’s profits soared! Your money is doubled.";
- balance=balance*2;
- }
- else
- {
- cout<<"All of a sudden, natural disasters began to strike at your holdings! Your money is quartered.";
- balance=balance/4;
- }
- break;
- default:
- cout << "No significant events have occurred!"<<endl;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement