#include <stdio.h>
#include <stdlib.h>    // for random number generators: srand() and rand()
#include <time.h>      // for time()
#include "blackjack.h" // for Bender's functions 


void printWelcome();
int getTotalInitCash();
void playGame(int totalcash);


int main()
{
	int totalinitcash = 0;

	srand(time(NULL));  // initialize random number generator 

	/* print welcome, get money, and start game */
	printWelcome();

	totalinitcash = getTotalInitCash();
	playGame(totalinitcash);
	return 0;
}

/* Prints welcome message */
void printWelcome()
{
	printf("\n--------------------------------------------------\n");
	printf("        WELCOME TO BENDER'S BLACKJACK TABLE         \n"); 
	printf("--------------------------------------------------\n\n");
}

/* Gets total initial cash from user */ 
int getTotalInitCash()
{
	return 100;
}

/* Main play function */ 
void playGame(int totalinitcash)
{
	int cardnum = 0;
	char c;
	while(1)
	{
		c = readChar();
		cardnum = drawRandomCard();
		printf(" --> ");
		printCard(cardnum);              
		printf("%d \n", getCardValue(cardnum)); 
	}
}

