View Code
. . cards[],playerPoints[],dealerPoints[],total[. . . initCardsScreen(cards,playerPoints,dealerPoints,total, &. dealerGetsCard(&. printf(. playerGetsCard(&. playerGetsCard(&. . ans = getAns(. ( ans == . playerGetsCard(&. ( ans != . . dealerGetsCard(&. (dealerPoints[ACEHIGH] < . ans = getAns(. (ans==. . }
. dealerGetsCard(&numCards,cards, dealerPoints);
. dealerGetsCard( *numCards, cards[. dealerPoints[]);
void dealerGetsCard ( int *numCards , int cards[] , int dealerPoints[] );
. dealerGetsCard( *numCards, cards[], dealerPoints[. . newCard =. printf(. }
dealerGetsCard( *numCards, cards[],
. dealCard( * numCards, cards[. dealCard( * numCards, cards[. . srand(time(&. subDraw = (rand()%(*numCards)); . cardDrawn =. cards[subDraw] = cards[*numCards -. (*numCards)--. . }
. time_t t;
. srand(time(&t));
srand( time ( NULL ) );
int main(void) { /*……*/ do{ srand( time ( NULL ) ); /*21點游戲*/ } while( getAns("\nPlay again(Y/N)?") == 'Y' ); /*詢問是否繼續*/ return 0; }
. subDraw = ( rand() % (*numCards) );
dispCard ( dealCard( numCards , cards ) , dealerPoints ) ; //原115. dispCard(newCard,dealerPoints);