adds activePlayerList and runningPlayerList (XVI)
This commit is contained in:
@@ -32,6 +32,9 @@ public:
|
|||||||
virtual void setPlayersTurn(int) =0;
|
virtual void setPlayersTurn(int) =0;
|
||||||
virtual int getPlayersTurn() const =0;
|
virtual int getPlayersTurn() const =0;
|
||||||
|
|
||||||
|
virtual void setCurrentPlayersTurnId(unsigned) =0;
|
||||||
|
virtual unsigned getCurrentPlayersTurnId() const =0;
|
||||||
|
|
||||||
virtual void setCurrentPlayersTurnIt(PlayerListIterator) =0;
|
virtual void setCurrentPlayersTurnIt(PlayerListIterator) =0;
|
||||||
virtual PlayerListIterator getCurrentPlayersTurnIt() const =0;
|
virtual PlayerListIterator getCurrentPlayersTurnIt() const =0;
|
||||||
|
|
||||||
|
|||||||
@@ -41,6 +41,25 @@ LocalBeRo::LocalBeRo(HandInterface* hi, int id, unsigned dP, int sB, GameState g
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// int i;
|
// int i;
|
||||||
@@ -73,111 +92,12 @@ void LocalBeRo::nextPlayer() {
|
|||||||
|
|
||||||
void LocalBeRo::run() {
|
void LocalBeRo::run() {
|
||||||
|
|
||||||
int i;
|
|
||||||
PlayerListIterator it;
|
|
||||||
|
|
||||||
if (firstRun) {
|
if (firstRun) {
|
||||||
|
|
||||||
|
myHand->getGuiInterface()->dealBeRoCards(myBeRoID);
|
||||||
|
firstRun = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|
||||||
// PlayerListIterator it;
|
|
||||||
|
|
||||||
// search bigBlindPosition in runningPlayerList -> old: delete
|
|
||||||
// it_1 = find(getMyHand()->getRunningPlayerList()->begin(), getMyHand()->getRunningPlayerList()->end(), *bigBlindPositionIt);
|
|
||||||
|
|
||||||
// search bigBlindPosition in runningPlayerList
|
|
||||||
// PlayerListIterator bigBlindPositionIt = getMyHand()->getRunningPlayerIt(getBigBlindPositionId());
|
|
||||||
|
|
||||||
// more than 2 players are still active -> runningPlayerList is not empty
|
|
||||||
if(getMyHand()->getActivePlayerList()->size() > 2) {
|
|
||||||
|
|
||||||
// bigBlindPlayer not found in runningPlayerList (he is all in) -> bigBlindPlayer is not the running player before first action player
|
|
||||||
if(bigBlindPositionIt == getMyHand()->getRunningPlayerList()->end()) {
|
|
||||||
|
|
||||||
// search smallBlindPosition in runningPlayerList
|
|
||||||
PlayerListIterator smallBlindPositionIt = getMyHand()->getRunningPlayerIt(getSmallBlindPositionId());
|
|
||||||
// if(smallBlindPositionIt == getMyHand()->getActivePlayerList()->begin()) smallBlindPositionIt = getMyHand()->getActivePlayerList()->end();
|
|
||||||
// smallBlindPositionIt--;
|
|
||||||
// it_2 = find(getMyHand()->getRunningPlayerList()->begin(), getMyHand()->getRunningPlayerList()->end(), *smallBlindPositionIt);
|
|
||||||
|
|
||||||
// smallBlindPlayer not found in runningPlayerList (he is all in) -> next active player before smallBlindPlayer is running player before first action player
|
|
||||||
if(smallBlindPositionIt == getMyHand()->getRunningPlayerList()->end()) {
|
|
||||||
|
|
||||||
it = getMyHand()->getActivePlayerIt(getSmallBlindPositionId());
|
|
||||||
assert(it != getMyHand()->getActivePlayerList()->end());
|
|
||||||
|
|
||||||
if(it == getMyHand()->getActivePlayerList()->begin()) it = getMyHand()->getActivePlayerList()->end();
|
|
||||||
it--;
|
|
||||||
|
|
||||||
setFirstRoundLastPlayersTurnId( (*it)->getMyUniqueID() );
|
|
||||||
|
|
||||||
|
|
||||||
// it_3 = find(getMyHand()->getRunningPlayerList()->begin(), getMyHand()->getRunningPlayerList()->end(), *it_2);
|
|
||||||
// if(it_3 == getMyHand()->getRunningPlayerList()->end()) {
|
|
||||||
// cout << "ERROR - lastPlayersTurnIt-detection in localBeRoPreflop" << endl;
|
|
||||||
// } else {
|
|
||||||
// setLastPlayersTurnIt(it_3);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
// smallBlindPlayer found in runningPlayerList -> running player before first action player
|
|
||||||
else {
|
|
||||||
setFirstRoundLastPlayersTurnId( getSmallBlindPositionId() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// bigBlindPlayer found in runningPlayerList -> player before first action player
|
|
||||||
else {
|
|
||||||
setFirstRoundLastPlayersTurnId( getBigBlindPositionId() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// heads up -> dealer/smallBlindPlayer is first action player and bigBlindPlayer is player before
|
|
||||||
else {
|
|
||||||
|
|
||||||
// bigBlindPlayer not found in runningPlayerList (he is all in) -> only smallBlind has to choose fold or call the bigBlindAmount
|
|
||||||
if(bigBlindPositionIt == getMyHand()->getRunningPlayerList()->end()) {
|
|
||||||
|
|
||||||
// search smallBlindPosition in runningPlayerList
|
|
||||||
PlayerListIterator smallBlindPositionIt = getMyHand()->getRunningPlayerIt(getSmallBlindPositionId());
|
|
||||||
|
|
||||||
// smallBlindPlayer not found in runningPlayerList (he is all in) -> no running player -> showdown and no firstRoundLastPlayersTurnId is used
|
|
||||||
if(smallBlindPositionIt == getMyHand()->getRunningPlayerList()->end()) {
|
|
||||||
|
|
||||||
}
|
|
||||||
// smallBlindPlayer found in runningPlayerList -> running player before first action player (himself)
|
|
||||||
else {
|
|
||||||
setFirstRoundLastPlayersTurnId( getSmallBlindPositionId() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
setFirstRoundLastPlayersTurnId( getBigBlindPositionId() );
|
|
||||||
}
|
|
||||||
|
|
||||||
setCurrentPlayersTurnId( getFirstRoundLastPlayersTurnId() );
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// determine smallBlindPosition
|
// determine smallBlindPosition
|
||||||
PlayerListIterator smallBlindPositionIt;
|
PlayerListIterator smallBlindPositionIt;
|
||||||
@@ -220,57 +140,62 @@ void LocalBeRo::run() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// determine smallBlindPosition
|
|
||||||
// PlayerListIterator smallBlindPositionIt;
|
|
||||||
|
|
||||||
// for(smallBlindPositionIt=myHand->getActivePlayerList()->begin(); smallBlindPositionIt!=myHand->getActivePlayerList()->end(); smallBlindPositionIt++) {
|
|
||||||
// if((*smallBlindPositionIt)->getMyButton() == BUTTON_SMALL_BLIND) break;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// determine running player before smallBlind (for heads up: determine dealer/smallblind)
|
|
||||||
PlayerListIterator it_1, it_2;
|
|
||||||
size_t i;
|
|
||||||
|
|
||||||
// running player before smallBlind
|
if(!(myHand->getAllInCondition())) {
|
||||||
if(myHand->getActivePlayerList()->size() > 2) {
|
|
||||||
it_1 = myHand->getActivePlayerIt(smallBlindPositionId);
|
|
||||||
assert( it_1 != myHand->getActivePlayerList()->end() );
|
|
||||||
for(i=0; i<myHand->getActivePlayerList()->size(); i++) {
|
// determine smallBlindPosition
|
||||||
if(it_1 == myHand->getActivePlayerList()->begin()) it_1 = myHand->getActivePlayerList()->end();
|
// PlayerListIterator smallBlindPositionIt;
|
||||||
it_1--;
|
|
||||||
it_2 = find(myHand->getRunningPlayerList()->begin(), myHand->getRunningPlayerList()->end(), *it_1);
|
// for(smallBlindPositionIt=myHand->getActivePlayerList()->begin(); smallBlindPositionIt!=myHand->getActivePlayerList()->end(); smallBlindPositionIt++) {
|
||||||
// running player found
|
// if((*smallBlindPositionIt)->getMyButton() == BUTTON_SMALL_BLIND) break;
|
||||||
if(it_2 != myHand->getRunningPlayerList()->end()) {
|
// }
|
||||||
lastPlayersTurnIt = it_2;
|
|
||||||
break;
|
// determine running player before smallBlind (for heads up: determine dealer/smallblind)
|
||||||
|
PlayerListIterator it_1, it_2;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
// running player before smallBlind
|
||||||
|
bool runningPlayerFound = false;
|
||||||
|
if(myHand->getActivePlayerList()->size() > 2) {
|
||||||
|
|
||||||
|
it_1 = myHand->getActivePlayerIt(smallBlindPositionId);
|
||||||
|
assert( it_1 != myHand->getActivePlayerList()->end() );
|
||||||
|
|
||||||
|
for(i=0; i<myHand->getActivePlayerList()->size(); i++) {
|
||||||
|
|
||||||
|
if(it_1 == myHand->getActivePlayerList()->begin()) it_1 = myHand->getActivePlayerList()->end();
|
||||||
|
it_1--;
|
||||||
|
|
||||||
|
it_2 = myHand->getRunningPlayerIt((*it_1)->getMyUniqueID());
|
||||||
|
// running player found
|
||||||
|
if(it_2 != myHand->getRunningPlayerList()->end()) {
|
||||||
|
firstRoundLastPlayersTurnId = (*it_2)->getMyUniqueID();
|
||||||
|
runningPlayerFound = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
assert(runningPlayerFound);
|
||||||
}
|
}
|
||||||
}
|
// heads up: bigBlind begins -> dealer/smallBlind is running player before bigBlind
|
||||||
// heads up: bigBlind begins -> dealer/smallBlind is running player before bigBlind
|
|
||||||
else {
|
|
||||||
//TODO
|
|
||||||
// it_1 = find(myHand->getRunningPlayerList()->begin(), myHand->getRunningPlayerList()->end(), *smallBlindPositionIt);
|
|
||||||
if( it_1 == myHand->getRunningPlayerList()->end() ) {
|
|
||||||
cout << "ERROR - lastPlayersTurnIt-detection in localBeRo" << endl;
|
|
||||||
}
|
|
||||||
// smallBlind found
|
|
||||||
else {
|
else {
|
||||||
lastPlayersTurnIt = it_1;
|
firstRoundLastPlayersTurnId = smallBlindPositionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
currentPlayersTurnId = firstRoundLastPlayersTurnId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPlayersTurnIt = lastPlayersTurnIt;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -285,12 +210,13 @@ void LocalBeRo::run() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
myHand->getGuiInterface()->dealBeRoCards(myBeRoID);
|
|
||||||
firstRun = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
|
|
||||||
//log the turned cards
|
//log the turned cards
|
||||||
if(!logBoardCardsDone) {
|
if(!logBoardCardsDone) {
|
||||||
|
|
||||||
@@ -320,13 +246,19 @@ void LocalBeRo::run() {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
PlayerListIterator it;
|
||||||
|
PlayerListIterator it_c;
|
||||||
|
|
||||||
|
|
||||||
// test if all running players have same sets (else allHighestSet = false)
|
// test if all running players have same sets (else allHighestSet = false)
|
||||||
for(it=myHand->getRunningPlayerList()->begin(); it!=myHand->getRunningPlayerList()->end(); it++) {
|
for( it_c = myHand->getRunningPlayerList()->begin(); it_c != myHand->getRunningPlayerList()->end(); it_c++) {
|
||||||
if(highestSet != (*it)->getMySet()) {
|
if(highestSet != (*it_c)->getMySet()) {
|
||||||
allHighestSet = false;
|
allHighestSet = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int i;
|
||||||
|
|
||||||
// prfen, ob aktuelle bero wirklich dran ist
|
// prfen, ob aktuelle bero wirklich dran ist
|
||||||
if(!firstRound && allHighestSet) {
|
if(!firstRound && allHighestSet) {
|
||||||
@@ -341,8 +273,8 @@ void LocalBeRo::run() {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
//Action loeschen und ActionButtons refresh
|
//Action loeschen und ActionButtons refresh
|
||||||
for(it=myHand->getRunningPlayerList()->begin(); it!=myHand->getRunningPlayerList()->end(); it++) {
|
for(it_c=myHand->getRunningPlayerList()->begin(); it_c!=myHand->getRunningPlayerList()->end(); it_c++) {
|
||||||
(*it)->setMyAction(PLAYER_ACTION_NONE);
|
(*it_c)->setMyAction(PLAYER_ACTION_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Sets in den Pot verschieben und Sets = 0 und Pot-refresh
|
//Sets in den Pot verschieben und Sets = 0 und Pot-refresh
|
||||||
@@ -386,9 +318,19 @@ void LocalBeRo::run() {
|
|||||||
|
|
||||||
|
|
||||||
// determine next running player
|
// determine next running player
|
||||||
|
// currentPlayersTurnIt++;
|
||||||
|
// if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||||
|
|
||||||
|
|
||||||
|
// determine next running player
|
||||||
|
PlayerListConstIterator currentPlayersTurnIt = myHand->getRunningPlayerIt( currentPlayersTurnId );
|
||||||
|
assert( currentPlayersTurnIt != myHand->getRunningPlayerList()->end() );
|
||||||
|
|
||||||
currentPlayersTurnIt++;
|
currentPlayersTurnIt++;
|
||||||
if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||||
|
|
||||||
|
currentPlayersTurnId = (*currentPlayersTurnIt)->getMyUniqueID();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -412,22 +354,23 @@ void LocalBeRo::run() {
|
|||||||
|
|
||||||
// myHand->getPlayerArray()[playersTurn]->setMyTurn(1);
|
// myHand->getPlayerArray()[playersTurn]->setMyTurn(1);
|
||||||
|
|
||||||
(*currentPlayersTurnIt)->setMyTurn(true);
|
|
||||||
|
|
||||||
|
|
||||||
//highlight active players groupbox and clear action
|
//highlight active players groupbox and clear action
|
||||||
myHand->getGuiInterface()->refreshGroupbox((*currentPlayersTurnIt)->getMyID(),2);
|
myHand->getGuiInterface()->refreshGroupbox(currentPlayersTurnId,2);
|
||||||
myHand->getGuiInterface()->refreshAction((*currentPlayersTurnIt)->getMyID(),0);
|
myHand->getGuiInterface()->refreshAction(currentPlayersTurnId,0);
|
||||||
|
|
||||||
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
// wenn wir letzter aktiver Spieler vor SmallBlind sind, dann flopFirstRound zuende
|
||||||
// ausnahme bei heads up !!! --> TODO
|
// ausnahme bei heads up !!! --> TODO
|
||||||
// if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind && myHand->getActivePlayerList()->size() >= 3) { firstRound = 0; }
|
// if(myHand->getPlayerArray()[playersTurn]->getMyID() == activePlayerBeforeSmallBlind && myHand->getActivePlayerList()->size() >= 3) { firstRound = 0; }
|
||||||
// if(myHand->getActivePlayerList()->size() < 3 && (myHand->getPlayerArray()[playersTurn]->getMyID() == dealerPosition || myHand->getPlayerArray()[playersTurn]->getMyID() == smallBlindPosition)) { firstRound = 0; }
|
// if(myHand->getActivePlayerList()->size() < 3 && (myHand->getPlayerArray()[playersTurn]->getMyID() == dealerPosition || myHand->getPlayerArray()[playersTurn]->getMyID() == smallBlindPosition)) { firstRound = 0; }
|
||||||
|
|
||||||
|
currentPlayersTurnIt = myHand->getRunningPlayerIt( currentPlayersTurnId );
|
||||||
|
assert( currentPlayersTurnIt != myHand->getRunningPlayerList()->end() );
|
||||||
|
|
||||||
|
(*currentPlayersTurnIt)->setMyTurn(true);
|
||||||
|
|
||||||
|
|
||||||
|
if( currentPlayersTurnId == firstRoundLastPlayersTurnId ) {
|
||||||
if( (*currentPlayersTurnIt) == (*lastPlayersTurnIt) ) {
|
|
||||||
firstRound = false;
|
firstRound = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -436,7 +379,7 @@ void LocalBeRo::run() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
if((*currentPlayersTurnIt)->getMyID() == 0) {
|
if( currentPlayersTurnId == 0) {
|
||||||
// Wir sind dran
|
// Wir sind dran
|
||||||
myHand->getGuiInterface()->meInAction();
|
myHand->getGuiInterface()->meInAction();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ void LocalBeRoPreflop::run() {
|
|||||||
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); it_c++) {
|
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); it_c++) {
|
||||||
if(getHighestSet() != (*it_c)->getMySet()) {
|
if(getHighestSet() != (*it_c)->getMySet()) {
|
||||||
allHighestSet = false;
|
allHighestSet = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +184,13 @@ void LocalBeRoPreflop::run() {
|
|||||||
|
|
||||||
// it++;
|
// it++;
|
||||||
|
|
||||||
PlayerListIterator currentPlayersTurnIt = getMyHand()->getRunningPlayerIt( getCurrentPlayersTurnId() );
|
|
||||||
|
|
||||||
|
cout << "size: " << getMyHand()->getRunningPlayerList()->size() << endl;
|
||||||
|
|
||||||
|
cout << "currentPlayerID: " << getCurrentPlayersTurnId() << endl;
|
||||||
|
|
||||||
|
PlayerListConstIterator currentPlayersTurnIt = getMyHand()->getRunningPlayerIt( getCurrentPlayersTurnId() );
|
||||||
assert( currentPlayersTurnIt != getMyHand()->getRunningPlayerList()->end() );
|
assert( currentPlayersTurnIt != getMyHand()->getRunningPlayerList()->end() );
|
||||||
|
|
||||||
currentPlayersTurnIt++;
|
currentPlayersTurnIt++;
|
||||||
|
|||||||
@@ -364,17 +364,21 @@ void LocalHand::switchRounds() {
|
|||||||
// cout << "playerID begin switchRounds(): " << getCurrentBeRo()->get
|
// cout << "playerID begin switchRounds(): " << getCurrentBeRo()->get
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
PlayerListIterator it;
|
PlayerListIterator it, it_1;
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
|
|
||||||
// refresh runningPlayerList
|
// refresh runningPlayerList
|
||||||
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); ) {
|
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); ) {
|
||||||
if((*it)->getMyAction() == 1 || (*it)->getMyAction() == 6) {
|
if((*it)->getMyAction() == 1 || (*it)->getMyAction() == 6) {
|
||||||
it = runningPlayerList->erase(it);
|
it = runningPlayerList->erase(it);
|
||||||
// it_1 = it;
|
if(!(runningPlayerList->empty())) {
|
||||||
// if(it_1 == runningPlayerList->begin()) it_1 = runningPlayerList->end();
|
|
||||||
// it_1--;
|
it_1 = it;
|
||||||
// getCurrentBeRo()->setCurrentPlayersTurnIt(it_1);
|
if(it_1 == runningPlayerList->begin()) it_1 = runningPlayerList->end();
|
||||||
|
it_1--;
|
||||||
|
getCurrentBeRo()->setCurrentPlayersTurnId((*it_1)->getMyUniqueID());
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
it++;
|
it++;
|
||||||
}
|
}
|
||||||
@@ -386,12 +390,16 @@ void LocalHand::switchRounds() {
|
|||||||
if ((*it_c)->getMyAction() == 6) allInPlayersCounter++;
|
if ((*it_c)->getMyAction() == 6) allInPlayersCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << "allInPlayersCounter: " << allInPlayersCounter << endl;
|
||||||
|
|
||||||
// TODO -> runningPlayerList.size()
|
// TODO -> runningPlayerList.size()
|
||||||
int nonFoldPlayerCounter = 0;
|
int nonFoldPlayerCounter = 0;
|
||||||
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
for (it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
|
||||||
if ((*it_c)->getMyAction() != 1) nonFoldPlayerCounter++;
|
if ((*it_c)->getMyAction() != 1) nonFoldPlayerCounter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << "nonFoldPlayerCounter: " << nonFoldPlayerCounter << endl;
|
||||||
|
|
||||||
//wenn nur noch einer nicht-folded dann gleich den Pot verteilen
|
//wenn nur noch einer nicht-folded dann gleich den Pot verteilen
|
||||||
if(nonFoldPlayerCounter==1) {
|
if(nonFoldPlayerCounter==1) {
|
||||||
myBoard->collectPot();
|
myBoard->collectPot();
|
||||||
@@ -515,11 +523,16 @@ PlayerListIterator LocalHand::getRunningPlayerIt(unsigned uniqueId) const {
|
|||||||
PlayerListIterator it;
|
PlayerListIterator it;
|
||||||
|
|
||||||
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
|
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
|
||||||
|
|
||||||
|
cout << (*it)->getMyUniqueID() << " ";
|
||||||
|
|
||||||
if((*it)->getMyUniqueID() == uniqueId) {
|
if((*it)->getMyUniqueID() == uniqueId) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cout << endl;
|
||||||
|
|
||||||
return it;
|
return it;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,6 +91,30 @@ ClientBeRo::getLastPlayersTurnIt() const
|
|||||||
return lastPlayersTurnIt;
|
return lastPlayersTurnIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientBeRo::setCurrentPlayersTurnId(unsigned theValue)
|
||||||
|
{
|
||||||
|
currentPlayersTurnId = theValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
ClientBeRo::getCurrentPlayersTurnId() const
|
||||||
|
{
|
||||||
|
return currentPlayersTurnId;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ClientBeRo::setFirstRoundLastPlayersTurnId(unsigned theValue)
|
||||||
|
{
|
||||||
|
firstRoundLastPlayersTurnId = theValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned
|
||||||
|
ClientBeRo::getFirstRoundLastPlayersTurnId() const
|
||||||
|
{
|
||||||
|
return firstRoundLastPlayersTurnId;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ClientBeRo::setHighestSet(int theValue)
|
ClientBeRo::setHighestSet(int theValue)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,12 @@ public:
|
|||||||
void setPlayersTurn(int theValue);
|
void setPlayersTurn(int theValue);
|
||||||
int getPlayersTurn() const;
|
int getPlayersTurn() const;
|
||||||
|
|
||||||
|
void setCurrentPlayersTurnId(unsigned theValue);
|
||||||
|
unsigned getCurrentPlayersTurnId() const;
|
||||||
|
|
||||||
|
void setFirstRoundLastPlayersTurnId(unsigned theValue);
|
||||||
|
unsigned getFirstRoundLastPlayersTurnId() const;
|
||||||
|
|
||||||
void setCurrentPlayersTurnIt(PlayerListIterator theValue);
|
void setCurrentPlayersTurnIt(PlayerListIterator theValue);
|
||||||
PlayerListIterator getCurrentPlayersTurnIt() const;
|
PlayerListIterator getCurrentPlayersTurnIt() const;
|
||||||
|
|
||||||
@@ -79,6 +85,10 @@ private:
|
|||||||
PlayerListIterator currentPlayersTurnIt; // iterator for runningPlayerList
|
PlayerListIterator currentPlayersTurnIt; // iterator for runningPlayerList
|
||||||
PlayerListIterator lastPlayersTurnIt; // iterator for runningPlayerList
|
PlayerListIterator lastPlayersTurnIt; // iterator for runningPlayerList
|
||||||
|
|
||||||
|
unsigned currentPlayersTurnId;
|
||||||
|
unsigned firstRoundLastPlayersTurnId;
|
||||||
|
|
||||||
|
|
||||||
int highestSet;
|
int highestSet;
|
||||||
bool firstRound;
|
bool firstRound;
|
||||||
int smallBlindPosition;
|
int smallBlindPosition;
|
||||||
|
|||||||
Reference in New Issue
Block a user