Archived

This topic is now archived and is closed to further replies.

Visual C++ 6.0

This topic is 4986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need help what is wrong with the 357 line it is not doing what i want it to! I am trying to make a Poker Game here is the code:
/*
  made by Eric Sondraal
  04.04.20
  V 2.5
 */
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <string>

using namespace std;

//things to do change the big while from && to ||



int main()
{
	short q = 1;
	int i = 1;
	short away[5];
	short done = 0;
	////////////////////////////////////////////////////////////////////////////////////////////

	short Number = 0;
	short Type = 0;
	const short Max_Number = 13;
	const short Max_Type = 4;
	char cutter;
	int money = 500;
	int bet = 0;
//humans cards

	short Human_Number[5];
	short Human_Type[5];
//Comp cards

	short Comp_Number[5];
	short Comp_Type[5];
/*---------------------------------------------------------------------------------------------*/
	short Taken = 999;
	short Gone[52];
//shorting out the Gone's

	Gone[1] = 0;
	Gone[2] = 0;
	Gone[3] = 0;
	Gone[4] = 0;
	Gone[5] = 0;
	Gone[6] = 0;
	Gone[7] = 0;
	Gone[8] = 0;
	Gone[9] = 0;
	Gone[10] = 0;
	Gone[11] = 0;
	Gone[12] = 0;
	Gone[13] = 0;
	Gone[14] = 0;
	Gone[15] = 0;
	Gone[16] = 0;
	Gone[17] = 0;
	Gone[18] = 0;
	Gone[19] = 0;
	Gone[20] = 0;
	Gone[21] = 0;
	Gone[22] = 0;
	Gone[23] = 0;
	Gone[24] = 0;
	Gone[25] = 0;
	Gone[26] = 0;
	Gone[27] = 0;
	Gone[28] = 0;
	Gone[29] = 0;
	Gone[30] = 0;
	Gone[31] = 0;
	Gone[32] = 0;
	Gone[33] = 0;
	Gone[34] = 0;
	Gone[35] = 0;
	Gone[36] = 0;
	Gone[37] = 0;
	Gone[38] = 0;
	Gone[39] = 0;
	Gone[40] = 0;
	Gone[41] = 0;
	Gone[42] = 0;
	Gone[43] = 0;
	Gone[44] = 0;
	Gone[45] = 0;
	Gone[46] = 0;
	Gone[47] = 0;
	Gone[48] = 0;
	Gone[49] = 0;
	Gone[50] = 0;
	Gone[51] = 0;
	Gone[52] = 0;

// starting of program

	cout << "deck shuffling..." << endl << "This is just a basic game of \"POKER!\"" << endl;

	srand( (unsigned)time( NULL ) );
	Number = rand() % Max_Number;
	++Number;
	Type = rand() % Max_Type;
	++Type;

	cout << "do you want to cut?" << endl << "\t(\"y\" or \"n\")?" << endl;
	cin >> cutter;
	if(cutter == 'y')
	{
		Number = rand() % Max_Number;
		++Number;
		cout << "Deck cut" << endl;
	}
	
	for( short good = 0; good == 0 ; )
	{
		cout << "You have have $500" << endl << "how much do you want to bet?" << endl << "$";
		cin >> bet;
		if(bet < 20)
		{
			cout << "Illegal bet must be more than $20" << endl;
			good = 0;
		}
		if(bet > money)
		{
			cout << "You do not have that much money" << endl;
			good = 0;
		}
		if((bet >= 20) && ( bet <= money))
		{
			good = 1;
		}
	}
//start the game


	cout << "Draw your cards" << endl;

	for( ; i < 6 ; i++)
	{
//humans cards


			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Human_Number[i] = Number;
			Human_Type[i] = Type;
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 1))
			{
			Taken = 1;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 1))
			{
			Taken = 2;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 1))
			{
			Taken = 3;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 1))
			{
			Taken = 4;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 1))
			{
			Taken = 5;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 1))
			{
			Taken = 6;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 1))
			{
			Taken = 7;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 1))
			{
			Taken = 8;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 1))
			{
			Taken = 9;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 1))
			{
			Taken = 10;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 1))
			{
			Taken = 11;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 1))
			{
			Taken = 12;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 1))
			{
			Taken = 13;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 2))
			{
			Taken = 14;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 2))
			{
			Taken = 15;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 2))
			{
			Taken = 16;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 2))
			{
			Taken = 17;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 2))
			{
			Taken = 18;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 2))
			{
			Taken = 19;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 2))
			{
			Taken = 20;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 2))
			{
			Taken = 21;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 2))
			{
			Taken = 22;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 2))
			{
			Taken = 23;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 2))
			{
			Taken = 24;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 2))
			{
			Taken = 25;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 2))
			{
			Taken = 26;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 3))
			{
			Taken = 27;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 3))
			{
			Taken = 28;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 3))
			{
			Taken = 29;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 3))
			{
			Taken = 30;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 3))
			{
			Taken = 31;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 3))
			{
			Taken = 32;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 3))
			{
			Taken = 33;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 3))
			{
			Taken = 34;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 3))
			{
			Taken = 35;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 3))
			{
			Taken = 36;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 3))
			{
			Taken = 37;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 3))
			{
			Taken = 38;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 3))
			{
			Taken = 39;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 4))
			{
			Taken = 40;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 4))
			{
			Taken = 41;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 4))
			{
			Taken = 42;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 4))
			{
			Taken = 43;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 4))
			{
			Taken = 44;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 4))
			{
			Taken = 45;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 4))
			{
			Taken = 46;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 4))
			{
			Taken = 47;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 4))
			{
			Taken = 48;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 4))
			{
			Taken = 49;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 4))
			{
			Taken = 50;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 4))
			{
			Taken = 51;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 4))
			{
			Taken = 52;
			}
			Gone[Taken] = 7;
			cout << "Taken = " << Taken << " Gone = " << Gone[Taken] << endl;

//**********************************I need help here!//******************************************

			while((Taken == Gone[1]) || (Taken == Gone[2]) || (Taken == Gone[3]) || (Taken == Gone[4]) || (Taken == Gone[5]) || (Taken == Gone[6]) || (Taken == Gone[7]) || (Taken == Gone[8]) || (Taken == Gone[9]) || (Taken == Gone[10]) || (Taken == Gone[11]) || (Taken == Gone[12]) || (Taken == Gone[13]) || (Taken == Gone[14]) || (Taken == Gone[15]) || (Taken == Gone[16]) || (Taken == Gone[17]) || (Taken == Gone[18]) || (Taken == Gone[19]) || (Taken == Gone[20]) || (Taken == Gone[21]) || (Taken == Gone[22]) || (Taken == Gone[23]) || (Taken == Gone[24]) || (Taken == Gone[25]) || (Taken == Gone[26]) || (Taken == Gone[27]) || (Taken == Gone[28]) || (Taken == Gone[29]) || (Taken == Gone[30]) || (Taken == Gone[31]) || (Taken == Gone[32]) || (Taken == Gone[33]) || (Taken == Gone[34]) || (Taken == Gone[35]) || (Taken == Gone[36]) || (Taken == Gone[37]) || (Taken == Gone[38]) || (Taken == Gone[39]) || (Taken == Gone[40]) || (Taken == Gone[41]) || (Taken == Gone[42]) || (Taken == Gone[43]) || (Taken == Gone[44]) || (Taken == Gone[45]) || (Taken == Gone[46]) || (Taken == Gone[47]) || (Taken == Gone[48]) || (Taken == Gone[49]) || (Taken == Gone[50]) || (Taken == Gone[51]) || (Taken == Gone[52]))
		{
			cout << "this is were i need help!" << endl;
			return 0;
			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Human_Number[i] = Number;
			Human_Type[i] = Type;
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 1))
			{
			Taken = 1;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 1))
			{
			Taken = 2;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 1))
			{
			Taken = 3;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 1))
			{
			Taken = 4;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 1))
			{
			Taken = 5;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 1))
			{
			Taken = 6;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 1))
			{
			Taken = 7;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 1))
			{
			Taken = 8;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 1))
			{
			Taken = 9;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 1))
			{
			Taken = 10;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 1))
			{
			Taken = 11;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 1))
			{
			Taken = 12;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 1))
			{
			Taken = 13;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 2))
			{
			Taken = 14;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 2))
			{
			Taken = 15;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 2))
			{
			Taken = 16;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 2))
			{
			Taken = 17;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 2))
			{
			Taken = 18;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 2))
			{
			Taken = 19;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 2))
			{
			Taken = 20;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 2))
			{
			Taken = 21;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 2))
			{
			Taken = 22;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 2))
			{
			Taken = 23;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 2))
			{
			Taken = 24;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 2))
			{
			Taken = 25;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 2))
			{
			Taken = 26;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 3))
			{
			Taken = 27;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 3))
			{
			Taken = 28;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 3))
			{
			Taken = 29;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 3))
			{
			Taken = 30;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 3))
			{
			Taken = 31;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 3))
			{
			Taken = 32;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 3))
			{
			Taken = 33;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 3))
			{
			Taken = 34;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 3))
			{
			Taken = 35;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 3))
			{
			Taken = 36;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 3))
			{
			Taken = 37;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 3))
			{
			Taken = 38;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 3))
			{
			Taken = 39;
			}
			if(( Human_Number[i] == 1 ) && ( Human_Type[i] == 4))
			{
			Taken = 40;
			}
			if(( Human_Number[i] == 2 ) && ( Human_Type[i] == 4))
			{
			Taken = 41;
			}
			if(( Human_Number[i] == 3 ) && ( Human_Type[i] == 4))
			{
			Taken = 42;
			}
			if(( Human_Number[i] == 4 ) && ( Human_Type[i] == 4))
			{
			Taken = 43;
			}
			if(( Human_Number[i] == 5 ) && ( Human_Type[i] == 4))
			{
			Taken = 44;
			}
			if(( Human_Number[i] == 6 ) && ( Human_Type[i] == 4))
			{
			Taken = 45;
			}
			if(( Human_Number[i] == 7 ) && ( Human_Type[i] == 4))
			{
			Taken = 46;
			}
			if(( Human_Number[i] == 8 ) && ( Human_Type[i] == 4))
			{
			Taken = 47;
			}
			if(( Human_Number[i] == 9 ) && ( Human_Type[i] == 4))
			{
			Taken = 48;
			}
			if(( Human_Number[i] == 10 ) && ( Human_Type[i] == 4))
			{
			Taken = 49;
			}
			if(( Human_Number[i] == 11 ) && ( Human_Type[i] == 4))
			{
			Taken = 50;
			}
			if(( Human_Number[i] == 12 ) && ( Human_Type[i] == 4))
			{
			Taken = 51;
			}
			if(( Human_Number[i] == 13 ) && ( Human_Type[i] == 4))
			{
			Taken = 52;
			}
		}
		Gone[Taken] = Taken;
//Comp cards


			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Comp_Number[i] = Number;
			Comp_Type[i] = Type;
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 1))
			{
			Taken = 1;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 1))
			{
			Taken = 2;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 1))
			{
			Taken = 3;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 1))
			{
			Taken = 4;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 1))
			{
			Taken = 5;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 1))
			{
			Taken = 6;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 1))
			{
			Taken = 7;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 1))
			{
			Taken = 8;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 1))
			{
			Taken = 9;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 1))
			{
			Taken = 10;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 1))
			{
			Taken = 11;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 1))
			{
			Taken = 12;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 1))
			{
			Taken = 13;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 2))
			{
			Taken = 14;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 2))
			{
			Taken = 15;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 2))
			{
			Taken = 16;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 2))
			{
			Taken = 17;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 2))
			{
			Taken = 18;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 2))
			{
			Taken = 19;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 2))
			{
			Taken = 20;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 2))
			{
			Taken = 21;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 2))
			{
			Taken = 22;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 2))
			{
			Taken = 23;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 2))
			{
			Taken = 24;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 2))
			{
			Taken = 25;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 2))
			{
			Taken = 26;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 3))
			{
			Taken = 27;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 3))
			{
			Taken = 28;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 3))
			{
			Taken = 29;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 3))
			{
			Taken = 30;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 3))
			{
			Taken = 31;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 3))
			{
			Taken = 32;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 3))
			{
			Taken = 33;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 3))
			{
			Taken = 34;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 3))
			{
			Taken = 35;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 3))
			{
			Taken = 36;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 3))
			{
			Taken = 37;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 3))
			{
			Taken = 38;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 3))
			{
			Taken = 39;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 4))
			{
			Taken = 40;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 4))
			{
			Taken = 41;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 4))
			{
			Taken = 42;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 4))
			{
			Taken = 43;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 4))
			{
			Taken = 44;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 4))
			{
			Taken = 45;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 4))
			{
			Taken = 46;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 4))
			{
			Taken = 47;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 4))
			{
			Taken = 48;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 4))
			{
			Taken = 49;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 4))
			{
			Taken = 50;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 4))
			{
			Taken = 51;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 4))
			{
			Taken = 52;
			}
			
//////////////////////////

		while((Taken == Gone[1]) || (Taken == Gone[2]) || (Taken == Gone[3]) || (Taken == Gone[4]) || (Taken == Gone[5]) || (Taken == Gone[6]) || (Taken == Gone[7]) || (Taken == Gone[8]) || (Taken == Gone[9]) || (Taken == Gone[10]) || (Taken == Gone[11]) || (Taken == Gone[12]) || (Taken == Gone[13]) || (Taken == Gone[14]) || (Taken == Gone[15]) || (Taken == Gone[16]) || (Taken == Gone[17]) || (Taken == Gone[18]) || (Taken == Gone[19]) || (Taken == Gone[20]) || (Taken == Gone[21]) || (Taken == Gone[22]) || (Taken == Gone[23]) || (Taken == Gone[24]) || (Taken == Gone[25]) || (Taken == Gone[26]) || (Taken == Gone[27]) || (Taken == Gone[28]) || (Taken == Gone[29]) || (Taken == Gone[30]) || (Taken == Gone[31]) || (Taken == Gone[32]) || (Taken == Gone[33]) || (Taken == Gone[34]) || (Taken == Gone[35]) || (Taken == Gone[36]) || (Taken == Gone[37]) || (Taken == Gone[38]) || (Taken == Gone[39]) || (Taken == Gone[40]) || (Taken == Gone[41]) || (Taken == Gone[42]) || (Taken == Gone[43]) || (Taken == Gone[44]) || (Taken == Gone[45]) || (Taken == Gone[46]) || (Taken == Gone[47]) || (Taken == Gone[48]) || (Taken == Gone[49]) || (Taken == Gone[50]) || (Taken == Gone[51]) || (Taken == Gone[52]))
		{
			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Comp_Number[i] = Number;
			Comp_Type[i] = Type;
		if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 1))
			{
			Taken = 1;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 1))
			{
			Taken = 2;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 1))
			{
			Taken = 3;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 1))
			{
			Taken = 4;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 1))
			{
			Taken = 5;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 1))
			{
			Taken = 6;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 1))
			{
			Taken = 7;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 1))
			{
			Taken = 8;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 1))
			{
			Taken = 9;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 1))
			{
			Taken = 10;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 1))
			{
			Taken = 11;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 1))
			{
			Taken = 12;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 1))
			{
			Taken = 13;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 2))
			{
			Taken = 14;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 2))
			{
			Taken = 15;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 2))
			{
			Taken = 16;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 2))
			{
			Taken = 17;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 2))
			{
			Taken = 18;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 2))
			{
			Taken = 19;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 2))
			{
			Taken = 20;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 2))
			{
			Taken = 21;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 2))
			{
			Taken = 22;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 2))
			{
			Taken = 23;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 2))
			{
			Taken = 24;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 2))
			{
			Taken = 25;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 2))
			{
			Taken = 26;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 3))
			{
			Taken = 27;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 3))
			{
			Taken = 28;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 3))
			{
			Taken = 29;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 3))
			{
			Taken = 30;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 3))
			{
			Taken = 31;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 3))
			{
			Taken = 32;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 3))
			{
			Taken = 33;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 3))
			{
			Taken = 34;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 3))
			{
			Taken = 35;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 3))
			{
			Taken = 36;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 3))
			{
			Taken = 37;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 3))
			{
			Taken = 38;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 3))
			{
			Taken = 39;
			}
			if(( Comp_Number[i] == 1 ) && ( Comp_Type[i] == 4))
			{
			Taken = 40;
			}
			if(( Comp_Number[i] == 2 ) && ( Comp_Type[i] == 4))
			{
			Taken = 41;
			}
			if(( Comp_Number[i] == 3 ) && ( Comp_Type[i] == 4))
			{
			Taken = 42;
			}
			if(( Comp_Number[i] == 4 ) && ( Comp_Type[i] == 4))
			{
			Taken = 43;
			}
			if(( Comp_Number[i] == 5 ) && ( Comp_Type[i] == 4))
			{
			Taken = 44;
			}
			if(( Comp_Number[i] == 6 ) && ( Comp_Type[i] == 4))
			{
			Taken = 45;
			}
			if(( Comp_Number[i] == 7 ) && ( Comp_Type[i] == 4))
			{
			Taken = 46;
			}
			if(( Comp_Number[i] == 8 ) && ( Comp_Type[i] == 4))
			{
			Taken = 47;
			}
			if(( Comp_Number[i] == 9 ) && ( Comp_Type[i] == 4))
			{
			Taken = 48;
			}
			if(( Comp_Number[i] == 10 ) && ( Comp_Type[i] == 4))
			{
			Taken = 49;
			}
			if(( Comp_Number[i] == 11 ) && ( Comp_Type[i] == 4))
			{
			Taken = 50;
			}
			if(( Comp_Number[i] == 12 ) && ( Comp_Type[i] == 4))
			{
			Taken = 51;
			}
			if(( Comp_Number[i] == 13 ) && ( Comp_Type[i] == 4))
			{
			Taken = 52;
			}

		}
		Gone[Taken] = Taken;
	}
	cout << "What cards do you want to through away?" << endl;
	for( ; q < i + 1 ; q++)
	{
		if((Human_Number[q] >= 2 ) && ( Human_Number[q] <= 10))
		{
			cout << Human_Number[q] << " ";
		}
		if(Human_Number[q] == 11)
		{
			cout << "Jack ";
		}
		if(Human_Number[q] == 12)
		{
			cout << "Quean ";
		}
		if(Human_Number[q] == 13)
		{
			cout << "King ";
		}
		if(Human_Number[q] == 1)
		{
			cout << "Ace ";
		}
		if(Human_Type[q] == 1)
		{
			cout << "Hearts";
		}
		if(Human_Type[q] == 2)
		{
			cout << "Dimonds";
		}
		if(Human_Type[q] == 3)
		{
			cout << "Clubs";
		}
		if(Human_Type[q] == 4)
		{
			cout << "Spades";
		}
		if( q == 6)
		{
			cout << "None";
		}
		cout << "(" << q << ")" << endl;
	}
	q = 0;
	while(( q != 5) && ( away[q] != 6))
	{
		++q;
		cin >> away[q];
		if(away[q] != 6)
		{
			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Human_Number[away[q]] = Number;
			Human_Type[away[q]] = Type;
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 1;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 2;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 3;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 4;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 5;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 6;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 7;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 8;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 9;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 10;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 11;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 12;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 13;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 14;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 15;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 16;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 17;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 18;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 19;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 20;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 21;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 22;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 23;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 24;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 25;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 26;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 27;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 28;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 29;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 30;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 31;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 32;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 33;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 34;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 35;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 36;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 37;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 38;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 39;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 40;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 41;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 42;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 43;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 44;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 45;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 46;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 47;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 48;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 49;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 50;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 51;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 52;
			}
		}
		while((Taken == Gone[1]) || (Taken == Gone[2]) || (Taken == Gone[3]) || (Taken == Gone[4]) || (Taken == Gone[5]) || (Taken == Gone[6]) || (Taken == Gone[7]) || (Taken == Gone[8]) || (Taken == Gone[9]) || (Taken == Gone[10]) || (Taken == Gone[11]) || (Taken == Gone[12]) || (Taken == Gone[13]) || (Taken == Gone[14]) || (Taken == Gone[15]) || (Taken == Gone[16]) || (Taken == Gone[17]) || (Taken == Gone[18]) || (Taken == Gone[19]) || (Taken == Gone[20]) || (Taken == Gone[21]) || (Taken == Gone[22]) || (Taken == Gone[23]) || (Taken == Gone[24]) || (Taken == Gone[25]) || (Taken == Gone[26]) || (Taken == Gone[27]) || (Taken == Gone[28]) || (Taken == Gone[29]) || (Taken == Gone[30]) || (Taken == Gone[31]) || (Taken == Gone[32]) || (Taken == Gone[33]) || (Taken == Gone[34]) || (Taken == Gone[35]) || (Taken == Gone[36]) || (Taken == Gone[37]) || (Taken == Gone[38]) || (Taken == Gone[39]) || (Taken == Gone[40]) || (Taken == Gone[41]) || (Taken == Gone[42]) || (Taken == Gone[43]) || (Taken == Gone[44]) || (Taken == Gone[45]) || (Taken == Gone[46]) || (Taken == Gone[47]) || (Taken == Gone[48]) || (Taken == Gone[49]) || (Taken == Gone[50]) || (Taken == Gone[51]) || (Taken == Gone[52]))
		{
			Number = rand() % Max_Number;
			++Number;
			Type = rand() % Max_Type;
			++Type;
			Human_Number[away[q]] = Number;
			Human_Type[away[q]] = Type;
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 1;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 2;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 3;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 4;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 5;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 6;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 7;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 8;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 9;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 10;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 11;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 12;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 1))
			{
			Taken = 13;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 14;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 15;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 16;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 17;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 18;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 19;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 20;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 21;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 22;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 23;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 24;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 25;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 2))
			{
			Taken = 26;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 27;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 28;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 29;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 30;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 31;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 32;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 33;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 34;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 35;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 36;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 37;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 38;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 3))
			{
			Taken = 39;
			}
			if(( Human_Number[away[q]] == 1 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 40;
			}
			if(( Human_Number[away[q]] == 2 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 41;
			}
			if(( Human_Number[away[q]] == 3 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 42;
			}
			if(( Human_Number[away[q]] == 4 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 43;
			}
			if(( Human_Number[away[q]] == 5 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 44;
			}
			if(( Human_Number[away[q]] == 6 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 45;
			}
			if(( Human_Number[away[q]] == 7 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 46;
			}
			if(( Human_Number[away[q]] == 8 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 47;
			}
			if(( Human_Number[away[q]] == 9 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 48;
			}
			if(( Human_Number[away[q]] == 10 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 49;
			}
			if(( Human_Number[away[q]] == 11 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 50;
			}
			if(( Human_Number[away[q]] == 12 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 51;
			}
			if(( Human_Number[away[q]] == 13 ) && ( Human_Type[away[q]] == 4))
			{
			Taken = 52;
			}
		}
		Gone[Taken] = Taken;
	}
//////////////////////////////////////////////////////////////////////////////////////////////

	q = 1;
	cout << "Your cards are now:" << endl;
	for( ; q < i + 1 ; q++)
	{
		if((Human_Number[q] >= 1 ) && ( Human_Number[q] <= 10))
		{
			cout << Human_Number[q] << " ";
		}
		if(Human_Number[q] == 11)
		{
			cout << "Jack ";
		}
		if(Human_Number[q] == 12)
		{
			cout << "Quean ";
		}
		if(Human_Number[q] == 13)
		{
			cout << "King ";
		}
		if(Human_Number[q] == 14)
		{
			cout << "Ace ";
		}
		if(Human_Type[q] == 1)
		{
			cout << "Hearts";
		}
		if(Human_Type[q] == 2)
		{
			cout << "Dimonds";
		}
		if(Human_Type[q] == 3)
		{
			cout << "Clubs";
		}
		if(Human_Type[q] == 4)
		{
			cout << "Spades";
		}
		if( q != 6)
		{
		cout << endl;
		}
	}
	
	cout << "The Comp's cards are:" << endl;

	Comp_Number[1] = 1;
	Comp_Number[2] = 10;
	Comp_Number[3] = 11;
	Comp_Number[4] = 12;
	Comp_Number[5] = 13;
	Comp_Type[1] = 1;
	Comp_Type[2] = 1;
	Comp_Type[3] = 1;
	Comp_Type[4] = 1;
	Comp_Type[5] = 1;

	
	if((Comp_Type[1] == Comp_Type[2] == Comp_Type[3] == Comp_Type[4] == Comp_Type[5]) && ((((Comp_Number[1]) || (Comp_Number[2]) || (Comp_Number[3]) || (Comp_Number[4]) || (Comp_Number[5])) == 1) && (((Comp_Number[1]) || (Comp_Number[2]) || (Comp_Number[3]) || (Comp_Number[4]) || (Comp_Number[5])) == 11) && (((Comp_Number[1]) || (Comp_Number[2]) || (Comp_Number[3]) || (Comp_Number[4]) || (Comp_Number[5])) == 10) && (((Comp_Number[1]) || (Comp_Number[2]) || (Comp_Number[3]) || (Comp_Number[4]) || (Comp_Number[5])) == 12) && (((Comp_Number[1]) || (Comp_Number[2]) || (Comp_Number[3]) || (Comp_Number[4]) || (Comp_Number[5])) == 13)) && (done != 1))
	{
		cout << "hi" << endl;
		q = 0;
		away[q] = 0;
		done = 1;
	}
	if(Comp_Type[1] == Comp_Type[2] == Comp_Type[3] == Comp_Type[4] == Comp_Type[5])
	{

	}



	






	return 0;
}
edit: the [source][/source] tag is your friend. [edited by - SiCrane on April 21, 2004 6:20:35 PM]

Share this post


Link to post
Share on other sites
array[n] has elements ranging from array[0] to array[n-1].

You try to access Gone[n], one past the last element. You may want to try a loop to assign the zeros as well.


blah blah blah.

[edited by - Chris Hare on April 21, 2004 6:24:54 PM]

Share this post


Link to post
Share on other sites
can''t help u with your problem, but when you initialize short Gone[52] instead of initializing every element to 0, just do this:
short Gone[ 52 ] = { 0 };
which initializes every subscript to 0.

Share this post


Link to post
Share on other sites
Hmm, do you mean you don''t want the chance for it to be drawn again?

If that''s the case, you can do a few things. One of them is (since it looks like you''re using the value in the array... I didn''t take the time to find out for what) having a second array of 52. It would be 0 if the card has not been drawn and 1 if it has.

Then, when a card is drawn, check if in that array it indicates that it has been before. If it has been drawn before, ignore and keep looking for a card. If it hasn''t been drawn before, set that second array''s value to 1 for the card and draw it.

This could be a costly algorhythm however. You might be inclined to use what is known as a "linked list", and remove the entity from the list entirely when it has been drawn. Then, lower the randomization number by 1 and choose from the remaining in the linked list. That will be much faster.

For more info on Linked lists, be sure to Google the "Standard Template Library." It''s a bit advanced, but nothing you can''t handle. If you get arrays, it''s only a bit more of a logical jump to grasp the concept of a linked list.

Share this post


Link to post
Share on other sites