Thread: Turret Champion

Results 1 to 8 of 8
  1. #1
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed

    Thumbs down Turret Champion

    Its a turret vs turret game with rounds . . . How many rounds will you least?
    Hope you like it
    Code:
    #include <iostream>
    #include <windows.h>
    #include <ctime>
    using namespace std;
    	int scorex = 0;
    	int multi2;
    	int hpp2 = 200;	
    	int multi;
    	int vida2 = 1;
    	int gold = 100;
    	int vida1 = 1;
    void score(){
    	cout << "You Survived " << scorex << " Rounds " << endl;
    	cin.get();
    	exit(1);
    }
    void gamepart1(){
    	time_t t;
    	time(&t);
    	srand(t);
    	char nopelea = 'n';
    	do{
    		multi2++;
    		multi = 3 + 1;
    		++multi;
    		vida1 = vida1 + 300 + 400;
    		hpp2 = hpp2 + 250;
    		vida2 = hpp2 + 400 + 400;
    		char upgrade;
    			cout << " Turret Board / Stats " << endl;
    			cout << " Turret Heatlh -> " << vida1 << endl; 
    			cout << " Turret Money  -> " << gold << endl;
    			cout << " Want to Upgrade Turret Health ? ( 210 Gold ) ( y / n )" << endl;
    			cin >> upgrade;
    		if (upgrade == 'y'){
    			if (gold>210){
    				cout << " Health Upgraded ! " << endl;
    				vida1 = vida1 + 150;
    				gold = gold - 310;
    			}else {
    				cout << " Need More Gold ! " << endl;
    		}
    		}
    			cout << " Want to Start Battle ? ( y / n )" << endl;
    			cin >> nopelea;
    	}while(nopelea == 'n');
    	do{
    		if (multi>1){
    		int dmg = rand() % 44 * multi;
    		int dmg2 = rand() % 26 * multi2;
    			cout << " Your Turret " << "                         " << " Enemy Turret " << endl;
    			cout << " Health ->" << vida1 << "                   " << " Health ->" << vida2 << endl;
    			cout << " You Deal " << dmg << "                   " << " Enemy Deal " << dmg2 << endl;
    			vida1 = vida1 - dmg2;
    			vida2 = vida2 - dmg;
    			cout << "Press Any Key to Continue Attacking" << endl;
    			cin.get();
    		if (vida1<0){
    			cout << "          You Lose GameOver   Press any key to continue . . . " << endl;
    			score ();
    		}else if (vida2<0){
    			cout << " You Win The Battle " << endl;
    			gold =  gold + 105;
    			gamepart1 ();
    		}
    		}
    		}while(nopelea == 'y');
    
    }
    
    int main(){
    		cout << "------------------------------" << endl;
    		cout << "| Welcome to Turret Champion |" << endl;
    		cout << "------------------------------" << endl;
    	gamepart1 ();
    }
    I know code is little messy but It was a very old project so decide to release it and edit some things . . . maybe someone found it usefull

  2. #2
    kibbles18's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    US
    Posts
    860
    Reputation
    5
    Thanks
    127
    I saw "include <iostream>, and left. Jk lol

  3. #3
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed
    xD include istream is soemthing bad?

  4. #4
    FailHacker's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Posts
    444
    Reputation
    8
    Thanks
    49
    Code:
    int main(){
    		cout << "------------------------------" << endl;
    		cout << "| Welcome to Turret Champion |" << endl;
    		cout << "------------------------------" << endl;
    	gamepart1 ();
    }

    this so much hahah

    I am assuming there is going to be gamepart2?
    Legen...wait for it...dary







  5. #5
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed
    and gamepart 3 :d

  6. #6
    Gunz5456's Avatar
    Join Date
    Jun 2008
    Gender
    male
    Location
    Somewhere in Mexico.
    Posts
    156
    Reputation
    10
    Thanks
    6
    My Mood
    Relaxed
    Can somebody compile this for me? Idk how :P

    Favorite quotes:
    "Revenge solves everything."
    -Dishonored

    "Imagine a future where we won't be living in the past. I'd be flipping birds like a chicken breast on a spatula."
    -George Watsky

    "Survival is overrated. I wanna live a little, too."
    -Celeste, from Mirror's Edge

    "History is written by the victor. And history is filled with liars."
    -Captain John Price, Call of Duty Modern Warfare 2

  7. #7
    alvaritos's Avatar
    Join Date
    May 2008
    Gender
    male
    Posts
    234
    Reputation
    9
    Thanks
    73
    My Mood
    Amazed
    Empty Project -> add source file main.cpp and copy / paste

  8. #8
    Gunz5456's Avatar
    Join Date
    Jun 2008
    Gender
    male
    Location
    Somewhere in Mexico.
    Posts
    156
    Reputation
    10
    Thanks
    6
    My Mood
    Relaxed
    Quote Originally Posted by alvaritos View Post
    Empty Project -> add source file main.cpp and copy / paste
    After compiling, how do I run it?
    EDIT: Nevermind, found it lol. Fun game!
    Last edited by Gunz5456; 08-09-2011 at 02:20 PM.

    Favorite quotes:
    "Revenge solves everything."
    -Dishonored

    "Imagine a future where we won't be living in the past. I'd be flipping birds like a chicken breast on a spatula."
    -George Watsky

    "Survival is overrated. I wanna live a little, too."
    -Celeste, from Mirror's Edge

    "History is written by the victor. And history is filled with liars."
    -Captain John Price, Call of Duty Modern Warfare 2

Similar Threads

  1. [Release] Turret Champion Final Release
    By alvaritos in forum C++/C Programming
    Replies: 5
    Last Post: 07-30-2011, 12:28 PM
  2. How can I play Gunbound World CHampion!?
    By Beer_Hunter in forum GunBound Hacks / Bots
    Replies: 5
    Last Post: 12-27-2007, 08:12 AM
  3. Gunbound World Champion
    By h0ang in forum GunBound Hacks / Bots
    Replies: 11
    Last Post: 09-10-2007, 07:25 AM
  4. Champions League Final
    By ktalin91 in forum WarRock Korea Hacks
    Replies: 6
    Last Post: 05-23-2007, 04:55 PM
  5. Teleportation Turret
    By Dreimos in forum WarRock - International Hacks
    Replies: 15
    Last Post: 06-01-2006, 11:54 AM