#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#define BUST = 21
enum status {BREAK, HIT, WIN}; /*Constants for game status*/
int randomcard(void); /*Function dealing 1 random card*/
int main()
{
int pcard,dcard = 0; /*Player card, and Dealer card*/
int dtotal, ptotal; /*Dealer, and Player totals*/
enum status gameStatus;
srand(time ( NULL ));
printf ("Welcome to Jeff's BlackJack Version 1.0\n\n");
pcard = randomcard();
dcard = randomcard();
dcard = dtotal; /*To keep the dealers first card from being known to the player*/
printf ("You were dealt a %d\n", pcard);
pcard = ptotal;
printf ("ptotal first %d\n", ptotal);
pcard = randomcard();
dcard = randomcard();
printf ("you were dealt a %d\n", pcard);
printf ("ptotal %d\n", ptotal);
ptotal = ptotal + pcard;
printf ("your total is %d\n", ptotal);
printf ("Dealer was dealt a %d\n", dtotal);
dcard += dtotal;
return 0;
}
int randomcard(void)
{
int card = 0;
card = rand() % 10;
return card;
}