示例#1
0
void splitHand(){
	if (2*bet<=chips){
		sleep(1.5);
		pad(5); printf("You chose to split your cards.\n");
		pad(10); printf("Starting First Split Hand:\n\n");
		playerSplit[0] = player[1]; //save second card
		pcount = player[0].val; 
		playerCardNum--;
		if (player[1].num=="A") aceP--;
		drawCard(0);
		showHand(0);
		cardCount(0);
		play();
		if (input!=0){ //if player didnt bust or blackjack
			playDealer();
			endRound();
		}
		pad(10); printf("Starting Second Split Hand:\n");
		player[0] = playerSplit[0];
		pcount=playerSplit[0].val; playerCardNum=1; ccount=0; dealerCardNum=0; //reset values
		drawCard(1);
		showHand(1);
		if (player[0].num=="A") aceP=1;
		else aceP=0;
		drawCard(0);
		showHand(0);
		drawCard(1);
		cardCount(0);
		play();
	}
	else{
		pad(5); printf("You do not have enough chips to split hand. Hit or Stay.\n\n");
	action();
	}
}
示例#2
0
void dealBlackJack(){
	drawCard(1); showHand(1);
	drawCard(0);  
	drawCard(1);
	sleep(1.5);
	drawCard(0); showHand(0);
}
示例#3
0
void startDealer(){
	sleep(1.5);
	pad(5); printf("You chose to stay. It is now the dealer's turn.\n\n");
	showHand(1);
	cardCount(1);
	cardCount(0);
}
示例#4
0
文件: GoBang.c 项目: hebly723/NW
int main()
{
	int player_x=1, player_y=1;
	#ifdef DEBUG
	showHand(a);
	#endif
	#ifndef DEBUG
	printf("\033[2J");
	#endif
	showGo(go);
	do{
		printf("----------------------------------------\n");
		scanf("%d%d", &player_x, &player_y);
		while (!(player_x>0&&player_x<16&&player_y>0&&player_y<16)||(go[player_x-1][player_y-1]!=0)){
			printf("请重新输入:\n");
			scanf("%d%d", &player_x, &player_y);
		}
		printf("----------------------------------------\n");
		go[player_x-1][player_y-1] = 1;
		//deepl(player_x-1, player_y-1, 1);
		deepl(player_x-1, player_y-1, 1);

		disDeep();
		#ifndef DEBUG
		printf("\033[2J");
		#endif

		showGo(go);
		//deepl(player_x-1, player_y-1, 1);
	}while(player_x<16&&player_y<16);
	//show(go);
	return 0;
}
示例#5
0
void hit(int ID){
	sleep(1.5);
	pad(5); printf("Hit, the next card is drawn.\n");
	drawCard(ID);
	showHand(ID);
	aceCheck(ID);
	cardCount(ID);
}