-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
37 lines (31 loc) · 827 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <stdbool.h>
#include "cards.h"
/* #include "cardArithmetic.h" */
#include "globalMacros.h"
#include "player.h"
#include "dealer.h"
#include "blackjackTable.h"
#include "graphics.h"
//TODO: Make dinamic
#define PLAYERAMOUNT 5
int main()
{
printCasinoWelcomeSign();
blackjackTable *newBlackjackTable = createBlackjackTable(100000);
char name[20];
printf("Enter the name of the players.\nWrite '%s' when done\n", ENOUGHSYMBOLSTRING);
while (true) {
scanf("%s",name);
FLUSHSTDIN;
/* if (newBlackjackTable->playerAmount == PLAYERAMOUNT) { */
/* break; */
/* } */
if (strcmp(name,ENOUGHSYMBOLSTRING) == ENOUGHSYMBOL) {
break;
}
newBlackjackTable = addPlayer(newBlackjackTable, name, 1000);
}
blackjackRound(newBlackjackTable);
destroyBlackjackTable(newBlackjackTable);
}