All pastes #221499 Raw Edit

Someone

public cpp v1 · immutable
#221499 ·published 2006-10-25 18:52 UTC
rendered paste body
#include <cstdlib>#include <iostream>#include <string>#include <fstream>#include <time.h>int credit=1400,x=0,lawl=0,test=0, color=0;int cards=0,cards2=2,valda[9];int pool=600, bet=0;bool loop=1,g=0,blinder=0;using namespace std;void bett(){    cout <<"Enter ammount to bet: ";    cin >> bet;    if(bet<=credit)    {        pool+=(bet+bet); credit= credit-bet;    }    else    {        cout << "YOU ARE BROKE!\n";    }}             int main(int argc, char *argv[]){    srand((unsigned)time(NULL));    string rad1 , rad2 , rad3, rad4, rad5, rad6, rad7;    string crad1,crad2,crad3,crad4,crad5,crad6,crad7;    string zrad1,zrad2,zrad3,zrad4,zrad5,zrad6,zrad7;    string theblind;    char* bb="Big blind";    char* sb="Small blind";    theblind = bb;    cout << "\n\n\n\n\n\n                      Welcome to Texas Holdem Poker! " << endl;    cout << "               _______   _______   _______   _______   _______ \n";    cout << "              |       | |       | |       | |       | |       |\n";    cout << "              |(\\/)  2| |(\\/)  3| |(\\/)  4| |(\\/)  5| |(\\/)  6|\n";    cout << "              | \\/    | | \\/    | | \\/    | | \\/    | | \\/    |\n";    cout << "              |    /\\ | |    /\\ | |    /\\ | |    /\\ | |    /\\ |\n";    cout << "              | 2 (/\\)| | 3 (/\\)| | 4 (/\\)| | 5 (/\\)| | 5 (/\\)|\n";    cout << "              |_______| |_______| |_______| |_______| |_______|\n\n";    cout << "                      You start off with 2000 Credits." << endl;    cout << "                      Click the ENTER button to continue." << endl;    cout << "\n\n\n\n\n\n";    cout << "\n                                           Made by Cray -06. All rights reserved";    cin.get();    while(loop==1)    {        while(cards<cards2)        {            int lawl=0;             x = rand() % 51;            for(int i = 0; i < 9; i++)            {                if(valda[i]==x)                {                    x = rand() % 51;                            i=0;                }            }            valda[lawl]=x;            lawl++;                                                       #include "kortlek.h"        #include "AI.h"        if(cards2==2)        {             zrad1+=rad1;            zrad2+=rad2;            zrad3+=rad3;            zrad4+=rad4;            zrad5+=rad5;            zrad6+=rad6;            zrad7+=rad7;        }        else        {             crad1+=rad1;            crad2+=rad2;            crad3+=rad3;            crad4+=rad4;            crad5+=rad5;            crad6+=rad6;            crad7+=rad7;        }                                                   cards++;        if(cards2==1 && test==1)        {            g=0;        }                                  system("CLS");        cout << " Your Credit: " << credit;        cout << "\n The pool   : " << pool << endl;        cout << " The blind: You got the "<< theblind << endl;        cout << "\n Cards on table:"<<endl;                           cout << crad1 << endl;         cout << crad2 << endl;        cout << crad3 << endl;        cout << crad4 << endl;        cout << crad5 << endl;        cout << crad6 << endl;        cout << crad7 << endl;        cout << "\n\n Your cards:\n" <<endl;        cout << zrad1 << endl;        cout << zrad2 << endl;        cout << zrad3 << endl;        cout << zrad4 << endl;        cout << zrad5 << endl;        cout << zrad6 << endl;        cout << zrad7 << endl;    }                                      if(test==1)    {        cards=0;        cards2=2;        test=0;        lawl=0;        system("pause");        crad1=crad2=crad3=crad4=crad5=crad6=crad7=        zrad1=zrad2=zrad3=zrad4=zrad5=zrad6=zrad7="";        system("CLS");        cout <<"\n Here shall be of you lost or won.\n\n\n";                                      if(credit <= 0)        {                          loop=0;            cout << "\nYou lost all your money!";        }        cout << " You won the pot containing " << pool << endl;  // if(won)                   cout << " which gives you a surplus of " << pool/2 << endl;         credit= credit + pool;        pool= pool - pool;        system("pause");        if(blinder==1)        {            if(credit<600)            {                cout <<" YOU ARE BROKE!\n";                return 0;            }        pool=pool+600;        credit=credit-600;        blinder=blinder-1;        theblind = bb;        }        else if(blinder==0)        {            if(credit<300)            {                cout <<" YOU ARE BROKE!\n";                return 0;            }        pool=pool+300;        credit=credit-300;        blinder=blinder+1;        theblind = sb;        }                                }                           else if(cards2==2)        {            cards=0;            cards2=3;                          bett();            system("pause");        }        else if(cards2==3)        {            cards=0;            cards2=1;            bett();            system("pause");        }        else if(cards2==1)        {                 cards=0;            cards2=1;            test++;            bett();            system("pause");        }        }    cout << "\n Detta tog ~10 timmar att skriva\n " << endl;                       system("PAUSE");    system("CLS");    return EXIT_SUCCESS;}