Untitled
raw download clone
CPP
views 194
,
size 37487 b
#include <iostream>
#include <locale.h>
#include <windows.h>
#include <cstdlib>
#include <conio.h>
#include <time.h>
#include <fstream>
#include <vector>
#include <algorithm>
#include <ctime>
#include <cctype>

using namespace std;




int main()
{
	int coins_sec=15, silver_sec=0, iron_coins=0, silver_coins=0, gold_coins=0, plat_coins=0; //COINS
	int main_menu; //MAIN_MENU
	int select_manager;// MANAGERS_MENU 
		int andy=0, morty=0, nati=0, rick=0, lock_andy=0, lock_morty=0, lock_nati=0, lock_rick=0; //MANAGERS
	int work_time=10, work_time2=0; // WORKING TIME
	int select_mission; //MISSIONS_MENU
	int reward_time1=0;
	int bonus_time=0, bonus=0;
	fstream howto;// FILE 
	string line;//HOW TO PLAY INSTRUCTION
/////////////////////////////////////////////////////////////////////////////////
//BEFORE PLAY
	HANDLE hOut;
	hOut = GetStdHandle( STD_OUTPUT_HANDLE );
	SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );

    				
////////////////////////////////////////////////////////////////////////////////
//MAIN MENU				
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n     	 WELCOME TO MY FIRST TYCOON! YOU CAN READ IN EVERY SECTION HOW EVERYTHING WORKS!n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							//WELCOME BEFORE PLAYING 
	while (plat_coins<=9)
	{
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n\n\n\n\n 	1. WORK			2. BUY		     3. MINIGAMES	   	 4. HELP        			\n\n\n\n\n"; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
							
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cout <<" | IRON COINS:   "; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout << iron_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout  << "   | SILVER COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << silver_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "  |   GOLD COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << gold_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << " |    PLAT COINS:    ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout << plat_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "    |";
							cout <<"\n-------------------------------------------------------------------------------------------\n";
		cin >> main_menu;
		system("cls");
///////////////////////////////////////////////////////////////////////////////		
//WORK - FIRST OPTION			
		if (main_menu==1)
				{
					for (; ; coins_sec)
							{
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n\n\n\n\n           			 WORKING... "<<work_time <<"\n\n\n\n\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
							
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cout <<" | IRON COINS:   "; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout << iron_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout  << "   | SILVER COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << silver_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "  |   GOLD COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << gold_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << " |    PLAT COINS:    ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout << plat_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "    |";
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							work_time--;
							iron_coins=iron_coins+coins_sec;
							silver_coins=silver_coins+silver_sec;
							Sleep(50);
							system("cls");
																										
										if (work_time==0)
											{
											work_time+=10;
											break;
											}	//IF FOR TIME
											
											if (iron_coins>=10000)
											{												
											silver_coins++;
											iron_coins=iron_coins-10000;
											} //IF FOR SILVER COINS
											
											if (silver_coins>=20)
											{												
											gold_coins++;
											silver_coins=silver_coins-20;
											} //IF FOR GOLD COINS
											
											if (gold_coins>=50)
											{												
											plat_coins++;
											gold_coins=gold_coins-50;
											} //IF FOR PLAT COINS	
											
											
							} //FOR LOOP
				} //MAIN_MENU=1	
///////////////////////////////////////////////////////////////////////////////		
//MANAGERS - SECOND OPTION			 
		if (main_menu==2)
				{
    						SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           			       CHOOSE YOUR MANAGER  \n";
							cout<<"\n 		        MANAGER    |	 COINS PER SEC    |      COST";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout<<"\n			1. ANDY   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout<<"     +30 IRON COINS/S   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout<<"     1 SILVER COIN";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout<<"\n			2. MORTY   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout<<"    +100 IRON COINS/S   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout<<"    5 SILVER COINS";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout<<"\n			3. NATI   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout<<"     +1000 IRON COINS/S   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout<<"   5 GOLD COINS";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout<<"\n			4. RICK   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout<<"     +2 SILVER COINS/S   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout<<"    1 PLAT COIN\n\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout<<"\n			5. RETURN TO MENU	6. INSTRUCTION   ";



							
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cout <<" | IRON COINS:   "; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout << iron_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout  << "   | SILVER COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << silver_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "  |   GOLD COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << gold_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << " |    PLAT COINS:    ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout << plat_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "    |";
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cin >> select_manager;
			
///////////////////////////////////////////////////////////////////////////////		
//MANAGERS - ANDY				
				if ((select_manager==1) && (lock_andy==0) && (silver_coins<=1))
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           			 TOO MANY COINS!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // TO MANY COINS
							
				if ((select_manager==1) && (silver_coins>=1 && (lock_andy==0)))
							{
							system("cls");
							coins_sec=coins_sec+30;
							silver_coins=silver_coins-1; //COST
							andy=1;
							lock_andy=1;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n           	       ANDY UNLOCKED! \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // MANAGER STATS
							
				else if	(lock_rick==1)
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           	      YOU CAN BUY THIS MANAGER ONLY ONCE!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // LOCK ANDY MANAGER		*/
			
///////////////////////////////////////////////////////////////////////////////		
//MANAGERS - MORTY				
			    if ((select_manager==2) && (lock_morty==0) && (silver_coins<=5))
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           			 TOO MANY COINS!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // TO MANY COINS
							
				if ((select_manager==2) && (silver_coins>=5 && (lock_morty==0)))
							{
							system("cls");
							coins_sec=coins_sec+100;
							silver_coins=silver_coins-5; //COST
							morty=1;
							lock_morty=1;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n           	              MORTY UNLOCKED! \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // MANAGER STATS
											
///////////////////////////////////////////////////////////////////////////////		
//MANAGERS - NATI				
			    if ((select_manager==3) && (lock_nati==0) && (gold_coins<=5))
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           			 TOO MANY COINS!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // TO MANY COINS
							
				if ((select_manager==3) && (gold_coins>=5) && (lock_nati==0))
							{
							system("cls");
							coins_sec=coins_sec+1000;
							gold_coins=gold_coins-5; //COST
							nati=1;
							lock_nati=1;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n           	               NATI UNLOCKED! \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // MANAGER STATS

///////////////////////////////////////////////////////////////////////////////		
//MANAGERS - RICK				
			    if ((select_manager==4) && (lock_rick==0) && (plat_coins<=1))
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           			 TOO MANY COINS!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // TO MANY COINS
							
				if ((select_manager==4) && (plat_coins>=1 && (lock_rick==0)))
							{
							system("cls");
							silver_sec=silver_sec+2;
							plat_coins=plat_coins-1; //COST
							rick=1;
							lock_rick=1;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n           	               RICK UNLOCKED! \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							} // MANAGER STATS
							
				if (select_manager==5)
						system("cls");
						
				if (select_manager==6)
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n    MANAGERS INCREASE YOUR COINS PER SECOND. YOU CAN ULOCK THEM ALL IN THE SECTION *MINIGAMES* \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
							}
				if (select_manager>=7)
							{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n           	    	 		 WRONG NUMBER!\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							}			
						
																																
				} //MAIN_MENU=2
		
		if (main_menu==3)
				{
						
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n\n    			       MINI-GAMES  \n\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout <<"			1. WHAT IS THE NUMBER? REWARD:";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout <<" +1 GOLD COIN \n"; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout <<"			2. HANGMAN GAME! REWARD: ";
							SetConsoleTextAttribute( hOut, FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout <<"+10 SEC WORKING TIME \n"; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout <<"			3. CASINO! REWARD: ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout <<" DOUBLE YOUR INVESTMENT!\n\n\n"; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout<<"\n			5. RETURN TO MENU	6. INSTRUCTION   ";
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cout <<" | IRON COINS:   "; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout << iron_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout  << "   | SILVER COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << silver_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "  |   GOLD COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << gold_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << " |    PLAT COINS:    ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout << plat_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "    |";
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cin >> select_mission;
							
							if(select_mission==1)
								 {
								 	system("cls");
								 	SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout <<"\n-------------------------------------------------------------------------------------------\n";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
									cout <<"\n\n\n\n\n           		 WHAT IS A NUMBER? (1 - 100) \n\n\n\n\n";

									int numb, shot, live=0;
   									srand(time(NULL));
   									numb = rand()%100+1;
    									while(shot!=numb)
    									{	
    										 live++;
										     cout<<"GUESS THE NUMBER (IT'S YOUR:  "<<live<<" TRY): ";
										     SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
								    cout <<"\n-------------------------------------------------------------------------------------------\n";
									cout <<" | IRON COINS:   "; 
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
									cout << iron_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout  << "   | SILVER COINS:   ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
									cout << silver_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << "  |   GOLD COINS:   ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
									cout << gold_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << " |    PLAT COINS:    ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
									cout << plat_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << "    |";
									cout <<"\n-------------------------------------------------------------------------------------------\n";
										     cin>>shot;
										     system("cls");
								     			 if(shot==numb)
								    				  {
													    system("cls");
														SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
														cout <<"\n-------------------------------------------------------------------------------------------\n";
														SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
														cout <<"\n      		 YOU WON! ON YOUR "<<live<<" TRY. YOUR REWARD";
														SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
														cout <<" + 1 GOLD COIN!  \n";
														SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	

														

													
									 				 }
								    			  else if(shot<numb)
								    			     { 
								       				   system("cls");
												       SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
												       cout <<"\n-------------------------------------------------------------------------------------------\n";
													   SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
													   cout <<"\n\n\n\n\n         			YOUR NUMBER IS TO LOW... \n\n\n\n\n";
													   SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													}
								                  else if(shot>numb)
								                    {
								                      system("cls");
								 					  SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													  cout <<"\n-------------------------------------------------------------------------------------------\n";
													  SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
													  cout <<"\n\n\n\n\n    				 YOUR NUMBER IS TO HIGH... \n\n\n\n\n";
													  SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													}
									    }//WHILE... GAME LOOOP    
    								  //AFTER WIN
    								 //AFTER WIN
    								reward_time1=1;
    								gold_coins+=1;
												
														 
					 			 }//SELECT_MISSION=1 	
	
							if (select_mission==2)
									{
									system("cls");
								 	SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout <<"\n-------------------------------------------------------------------------------------------\n";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
									cout <<"\n\n\n\n\n           		HANGMAN GAME! \n\n\n\n\n";
									
									
									const int MAX_WRONG = 8;  
								    vector<string> words; 
								    words.push_back("PIZZA");
								    words.push_back("BACON");
								    words.push_back("COMPLICATED");
								
								    srand(static_cast<unsigned int>(time(0)));
								    random_shuffle(words.begin(), words.end());
								    const string THE_WORD = words[0];            
								    int wrong = 0;                               
								    string soFar(THE_WORD.size(), '-');          
								    string used = "";                            
								
									cout<<"YOU HAVE  " <<(MAX_WRONG - wrong)<< " GUESSES, GOODLUCK!";
									
										while ((wrong < MAX_WRONG) && (soFar != THE_WORD))
									    		{
									    		 cout << "\nYOU'VE USED THE FOLLOWING LETTERS: " << used << endl;
									      		 cout << "THE WORD IS:  " << soFar << endl;
									        	 char guess;
									       		 cout << "\n\nENTER YOUR GUESS: ";
									        	 cin >> guess;
									             guess = toupper(guess); 
									
									        while (used.find(guess) != string::npos)
									       		 {
									            cout << "\nYOU'VE ALREADY GUESSED " << guess << endl;
									            cout << "ENTER YOUR GUESS: ";
									            cin >> guess;
									            guess = toupper(guess);
									        	 }						
									        used += guess;
								
									        if (THE_WORD.find(guess) != string::npos)
									       		 {
									       			system("cls");
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													cout <<"\n-------------------------------------------------------------------------------------------\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
													cout <<"\n      		  THAT'S RIGHT! '" << guess << "' IS IN THE WORD.\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									         	 for (unsigned int i = 0; i < THE_WORD.length(); ++i)
												    {
									        	      if (THE_WORD[i] == guess)
													  {
									                  soFar[i] = guess;
													  }
												    }
									        	}
									        else
									       		 {
												++wrong;
												system("cls");
												SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
												cout <<"\n-------------------------------------------------------------------------------------------\n";
												SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
												cout <<"\n           	SORRY, '" << guess << "' ISN'T IN THE WORD. YOU HAVE " <<(MAX_WRONG - wrong)<< " GUESSES LEFT.\n\n";
												SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
									       		 }
									   			 }
									    if (wrong == MAX_WRONG)
										{
									        cout << "GAME OVER!";
											
										}
									    else
										{
														system("cls");
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													cout <<"\n-------------------------------------------------------------------------------------------\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
													cout <<"\n      		 GOOD JOB! YOU WON! YOUR REWARD: ";
													SetConsoleTextAttribute( hOut, FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
													cout <<"  +10 SEC WORKING TIME\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									        		reward_time1=1;
									        		bonus++;
									        		bonus_time+=10;
									        		
										}
									}
									    	
								
							if (select_mission==3)
								{
									system("cls");
								 	SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout <<"\n-------------------------------------------------------------------------------------------\n";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
									cout <<"\n\n\n          			    WELCOME TO CASINO! \n\n\n";
									
									cout<<"		HOW MUCH DO YOU WANT TO INVEST? *YOU CAN INVEST ONLY";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
									cout <<" GOLD COINS!\n\n\n\n";																		
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
								    cout <<"\n-------------------------------------------------------------------------------------------\n";
									cout <<" | IRON COINS:   "; 
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
									cout << iron_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout  << "   | SILVER COINS:   ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
									cout << silver_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << "  |   GOLD COINS:   ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
									cout << gold_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << " |    PLAT COINS:    ";
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
									cout << plat_coins;
									SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
									cout << "    |";
									cout <<"\n-------------------------------------------------------------------------------------------\n";
									int chance, invest;
									cin >> invest;
									
									if (invest>=gold_coins)
													{
													system("cls");
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													cout <<"\n-------------------------------------------------------------------------------------------\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
													cout <<"\n           			 TOO MANY GOLD COINS!\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
													}
										
									if (invest<=gold_coins)
										{
										chance = rand() % 100;
											if (chance > 50) 
													{
													system("cls");
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													cout <<"\n-------------------------------------------------------------------------------------------\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
													cout <<"\n      		  GOOD JOB! YOU GET 2X FROM YOUR INVESTMENT!  \n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													invest*=2;
													gold_coins=gold_coins+invest;
													}
											if (chance <= 50)
													{
													system("cls");
													gold_coins=gold_coins-invest;
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
													cout <<"\n-------------------------------------------------------------------------------------------\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
													cout <<"\n           			 NOT THIS TIME !\n";
													SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );											
													}	
										}
								}
								
							if (select_mission==5)
									system("cls");
						
							if (select_mission==6)
								{
							system("cls");
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );	
							cout <<"\n      		  PLAY MINIGAMES SO LONG AS U WANT TO GET SUPER REWARDS!  \n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
								}
								
								
								
							
									
								
										
							
			} //MAIN_MENU==3 
			
			
			if ((main_menu==1) && (reward_time1==1))
			{
			work_time=work_time+bonus_time;
			}
			
			if (main_menu==4)
			{
				SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
				cout <<"\n-------------------------------------------------------------------------------------------\n";
				SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );	
				cout <<"HOW TO GET COINS? CLICK *1. WORK* IN MAIN MENU TO EARN SOME COINS\n\n";
				cout <<"\n 1 SILVER COIN - 10K IRON COINS  \n";
				cout <<"\n 1 GOLD COIN - 20 SILVER COINS  \n";
				cout <<"\n 1 PLAT COIN - 50 GOLD COINS  \n\n";
				cout <<"CLICK *2. BUY* TO BUY A NEW MANAGERS!\n";
				
				cout <<"\n\n COLLECT 10 PLAT COINS AND BUY ALL CHARACTERS FROM SECTION *2. BUY* TO WIN!  \n";
				SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
				
			}
			

///////////////////////////////////////////////////////////////////////////////		
// IF'S OUTSIDE THE LOOP				
	
		if (main_menu>=5)
			{
			system("cls");
			SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
			cout <<"\n-------------------------------------------------------------------------------------------\n";
			SetConsoleTextAttribute( hOut, FOREGROUND_RED | FOREGROUND_INTENSITY );		
			cout <<"\n           			 BAD NUMBER!\n";
			SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
			}

				
			
			
			
			
			
///////////////////////////////////////////////////////////////////////////////		
// END
	} //MAIN WHILE LOOP 
	
	SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );		
							cout <<"\n\n\n\n\n           			 YOU WON!!! \n\n\n\n\n";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );	
							
							cout <<"\n-------------------------------------------------------------------------------------------\n";
							cout <<" | IRON COINS:   "; 
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_INTENSITY );
							cout << iron_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout  << "   | SILVER COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << silver_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "  |   GOLD COINS:   ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY );
							cout << gold_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << " |    PLAT COINS:    ";
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY );
							cout << plat_coins;
							SetConsoleTextAttribute( hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED );
							cout << "    |";
							cout <<"\n-------------------------------------------------------------------------------------------\n"; //FINISH
} //INT MAIN
close fullscreen
Login or Register to edit or fork this paste. It's free.