void Table::run() { // TODO :: button must be set to next button player for next singleGame for( int i = PRE_START; i <= SHOWDOWN; i++ ) { this->currentRound = static_cast<BetRound>(i); if (currentRound != 1) // darf PRE_FLOP die blins nicht abkassieren tellThemNextRound(); // and collect money // Peda: sollte das nicht am Ende der Schleife stehen??? // todo: // 1. depending on bet round give 0 cardspre, then 3 cards, 1 card, or 1 card, or showdown if( PRE_START == currentRound) { tablePrepareForPreStart(); continue; } if( PRE_FLOP == currentRound) tablePrepareForPreFlop(); if( ON_FLOP == currentRound) tablePrepareForOnFlop(); if( ON_TURN == currentRound) tablePrepareForOnTurn(); if( ON_RIVER == currentRound) tablePrepareForOnRiver(); if( SHOWDOWN == currentRound) { tablePrepareForShowdown(); break; } // 1.1. display action status on SCREEN (community cards + players active with tehre status and player-bet-size) cout << endl << endl; for( Card *j : communityCards ) cout << *j << " - "; cout << endl; /* for ( iter = communityCards.begin( ) ; iter != communityCards.end( ) ; iter++ ) { Card * communityCards = *iter; cout << *communityCards << " - "; } */ // 2. now each player can perform its/his action doActionsForPlayers( currentRound ); // 3. after each player has done its things we must: // check if there are more than 1 player still active, if only one he is the winner ! } // end for betrounds // if there are more than one player left then check showdown // this means compare best hand for each player 5 out of 7 // determine best overall hand == winner ! } // end run
void Table::run() { // TODO :: button must be set to next button player for next singleGame for( int i = PRE_FLOP; i <= ON_RIVER; i++ ) { this->currentRound = static_cast<BetRound>(i); tellThemNextRound(); // and collect money // todo: // 1. depending on bet round give 0 cardspre, then 3 cards, 1 card, or 1 card, or showdown if( PRE_FLOP == currentRound) tablePrepareForPreFlopRound(); if( ON_FLOP == currentRound) tablePrepareForOnFlop(); if( ON_TURN == currentRound) tablePrepareForOnTurn(); if( ON_RIVER == currentRound) tablePrepareForOnRiver(); // 1.1. display action status on SCREEN (community cards + players active with tehre status and player-bet-size) // 2. now each player can perform its/his action doActionsForPlayers( currentRound ); // 3. after each player has done its things we must: // check if there are more than 1 player still active, if only one he is the winner ! } // end for betrounds // if there are more than one player left then check showdown // this means compare best hand for each player 5 out of 7 // determine best overall hand == winner ! } // end run