Example #1
0
void dealerTurn(table *t, deck *d) {
    
    assert((t) && (d));
    
    showCard(t->dealer->playerHand->cards[0]);
    sleep(1);
    displayTable(t, 1);
    
    /*Condition for soft 17*/
    if ((t->dealer->playerHand->score == 17) &&
        (t->dealer->playerHand->cardCount == 2) &&
        (isHiAce(t->dealer->playerHand->cards[0]) ||
         isHiAce(t->dealer->playerHand->cards[1]))) {
            dealCard(t, d, t->dealer, 1);
            assessHand(t->dealer->playerHand);
            sleep(1);
            displayTable(t, 1);
    }
    
    while (t->dealer->playerHand->score < 17) {
        dealCard(t, d, t->dealer, 1);
        assessHand(t->dealer->playerHand);
        sleep(1);
        displayTable(t, 1);
    }
}
Example #2
0
void SWipe::captureStart() {
	magDec = new MagDecode( this );
	connect( magDec, SIGNAL( cardRead( MagCard ) ), this, SLOT( showCard( MagCard ) ) );
	connect( magDec, SIGNAL( errorMsg( QString ) ), &statusLabel, SLOT( setText( QString ) ) );

	audioInput = new QAudioInput( audioFormat, this );
	magDec->start();
	audioInput->start( magDec );
	mainBtn.setText( "Stop" );
}
Example #3
0
void NumberWindow::resizeEvent(QResizeEvent * re) {
    showCard(currentText);
}