How do i get more dubs? (Blackjack code)

#include <iostream>
#include <ctime>
#include <cmath>
#include <cstdlib>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#define _WIN32_WINNT 0x0500

using namespace std;

void numberToCardTwo(int suit,int suit1, int value, int value1);
void numberToCard(int suit,int suit1, int value, int value1);
int outcome(int total, int summit, int q);

int main()
{
srand(time(NULL));

int suit, value;

cout<<"Hello, welcome to c++ blackjack! This game was created by Jake MacBrien, Taylor Burris and Dean Dawson." << endl;
cout<<endl;
cout<<" Directions: Blackjack is played using a standard deck of cards."<<endl;
cout<<"Get as close to 21 as possible without going over." <<endl;
cout<<"In this version of blackjack, your goal is to beat the house." <<endl;
cout<<"The house is the computer that is playing against you." <<endl;
cout<<"Every hand, the house will deal two cards each person." <<endl;
cout<<"You will only see one of the house's cards and the house will see one of yours." <<endl;
cout<<"You will then have two options; Hit or Stand." <<endl;
cout<<"If you hit, you will receive one more card from the deck to get closer to 21." <<endl;
cout<<"But, if you go over 21, you bust and automatically lose." <<endl;
cout<<"If you decide to stand, you will stay with your current two cards. " <<endl;
cout<<"The house will then decide if it wants to hit or stand in order to beat you. " <<endl;
cout<<"If both players have the same score it results in a push and neither player wins." << endl;

HWND console = GetConsoleWindow();
RECT r;
GetWindowRect(console, &r);
MoveWindow(console, r.right, r.top, 2000, 500, TRUE);

int answer;
cout<<"Welcome, are you ready to play blackjack? (Yes = 1/ No = 2)"<<endl;
cin>> answer;

if (answer == 2)
{
system("CLS");
cout<<"Goodbye!"<<endl;
}

else if(answer == 1)
{
int summit = 1;
int q = 0;
while(q < summit)
{
system("CLS");
system("COLOR 2F");

int dealerTotal, value1, suit1, choice, maximum = 2, total;

suit = rand() % 4;
value = rand() % 13 + 1;
suit1 = rand() % 4;
value1 = rand() % 13 + 1;
numberToCard(suit, suit1, value, value1);
dealerTotal = value + value1;

if(value > 10 || choice != 11)
{
if(value == 11)
{
value = 10;
}
if(value == 12)
{
value = 10;
}
if(value == 13)
{
value = 10;
}
}
if(value1 > 10 || choice != 11)
{
if(value1 == 11)
{
value1 = 10;
}
if(value1 == 12)
{
value1 = 10;
}
if(value1 == 13)
{
value1 = 10;
}
}
if(value == 1)
{
value = 11;
if(dealerTotal > 21)
{
value = 1;
}
}

if(value1 == 1)
{
value1 = 11;
if(dealerTotal > 21)
{
value1 = 1;
}
}
if(value == 1 && value1 == 1)
{
value = 11;
value1 = 1;
if(dealerTotal > 21)
{
value = 1;
value1 = 1;
}
}

cout<<"dealer value "<<value<<endl;
cout<<"dealer value "<<value1<<endl;
dealerTotal = value + value1;
cout << dealerTotal << endl;

suit = rand() % 4;
value = rand() % 13 + 1;
numberToCard(suit,suit1, value, value1);
suit1 = rand() % 4;
value1 = rand() % 13 + 1;
numberToCardTwo(suit, suit1, value, value1);

cout<< value<<endl;
cout<< value1<<endl;
if(value > 10 || choice != 11)
{
if(value == 11)
{
value = 10;
}
if(value == 12)
{
value = 10;
}
if(value == 13)
{
value = 10;
}
}
if(value == 1)
{
cout << "Would you like your ace to be?(1 or 11)" << endl;
cin >> choice;
if(choice == 1)
{
value = 1;
}
if(choice == 11)
{
value = 11;
}
}
if(value1 > 10 || choice != 11)
{
if(value1 == 11)
{
value1 = 10;
}
if(value1 == 12)
{
value1 = 10;
}
if(value1 == 13)
{
value1 = 10;
}
}
if(value1 == 1)
{
int choice;
cout << "Would you like your ace to be?(1 or 11)" << endl;
cin >> choice;
if(choice == 1)
{
value1 = 1;
}
if(choice == 11)
{
value1 = 11;
}
}

total = value + value1;
cout<<"Your total is "<< total << endl;

int hit;
cout<<"Hit(1) or Stay(2)? ==> ";
cin>> hit;
if(hit == 1)
{
maximum = 2;
for(int x = 1; x < maximum; x++)
{
suit = rand() % 4;
value = rand() % 13 + 1;
numberToCard(suit,suit1, value, value1);
total = value + total;
if(value == 1)
{
cout << "Would you like your ace to be?(1 or 11)" << endl;
cin >> choice;
if(choice == 1)
{
value = 1;
}
if(choice == 11)
{
value = 11;
}
}
if(value > 10 || choice != 11)
{
if(value == 11)
{
value = 10;
}
if(value == 12)
{
value = 10;
}
if(value == 13)
{
value = 10;
}
}

if(total > 21)
{
cout << "You busted! You take L's!" << endl;
cout << "Do you want to play again?(1 = Yes, 2 = No)" << endl;
cin >> choice;
if (choice == 1)
{
system("CLS");
}
else if (choice == 2)
{
system("CLS");
cout<<"Thank you for playing Black Jack!"<<endl;
q++;
}
}
}
}
if(hit == 2)
{
for(int x = 1; x < maximum; x++)
{
if (dealerTotal < total)
{
suit = rand() % 4;
value = rand() % 13 + 1;
numberToCard(suit,suit1, value, value1);
dealerTotal = dealerTotal + value;
cout<<"Dealer total is:"<< dealerTotal<<endl;
maximum++;
}

else if (dealerTotal > total)
{
cout << "Do you want to play again?(1 = Yes, 2 = No)" << endl;
cin >> choice;
if (choice == 1)
{
system("CLS");
}
else if (choice == 2)
{
system("CLS");
cout<<"Thank you for playing Black Jack!"<<endl;
}
}
}
}
}
}
return 0;
}

void numberToCard(int suit,int suit1, int value, int value1)
{
char a = 179;
if(suit == 0)
{

cout<<endl;
}
This is very hard to read. Please Remember to put code tags. I really don't understand the question you are asking.
Topic archived. No new replies allowed.