adds activePlayerList and runningPlayerList (VI)
This commit is contained in:
@@ -59,10 +59,9 @@ void LocalBeRoPreflop::run() {
|
|||||||
int i;
|
int i;
|
||||||
bool allHighestSet = true;
|
bool allHighestSet = true;
|
||||||
PlayerListIterator it;
|
PlayerListIterator it;
|
||||||
PlayerList runningPlayerList = getMyHand()->getRunningPlayerList();
|
|
||||||
|
|
||||||
// test if all running players have same sets (else allHighestSet = false)
|
// test if all running players have same sets (else allHighestSet = false)
|
||||||
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
|
for(it=getMyHand()->getRunningPlayerList()->begin(); it!=getMyHand()->getRunningPlayerList()->end(); it++) {
|
||||||
if(getHighestSet() != (*it)->getMySet()) {
|
if(getHighestSet() != (*it)->getMySet()) {
|
||||||
allHighestSet = false;
|
allHighestSet = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -360,6 +360,13 @@ void LocalHand::switchRounds() {
|
|||||||
int i;
|
int i;
|
||||||
PlayerListIterator it;
|
PlayerListIterator it;
|
||||||
|
|
||||||
|
// refresh runningPlayerList
|
||||||
|
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
|
||||||
|
if((*it)->getMyAction() == 1 || (*it)->getMyAction() == 6) {
|
||||||
|
it = runningPlayerList->erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Anzahl der Spieler ermitteln, welche All In sind
|
// Anzahl der Spieler ermitteln, welche All In sind
|
||||||
int allInPlayersCounter = 0;
|
int allInPlayersCounter = 0;
|
||||||
for (it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
for (it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
||||||
|
|||||||
@@ -969,16 +969,6 @@ void LocalPlayer::action() {
|
|||||||
|
|
||||||
myTurn = 0;
|
myTurn = 0;
|
||||||
// cout << "jetzt" << endl;
|
// cout << "jetzt" << endl;
|
||||||
|
|
||||||
if(myAction == 1 || myAction == 6) {
|
|
||||||
PlayerListIterator it;
|
|
||||||
for(it=actualHand->getRunningPlayerList()->begin(); it!=actualHand->getRunningPlayerList()->end(); it++) {
|
|
||||||
if((*it)->getMyID() == myID) {
|
|
||||||
(*it).reset();
|
|
||||||
it = actualHand->getRunningPlayerList()->erase(it);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//set that i was the last active player. need this for unhighlighting groupbox
|
//set that i was the last active player. need this for unhighlighting groupbox
|
||||||
actualHand->setLastPlayersTurn(myID);
|
actualHand->setLastPlayersTurn(myID);
|
||||||
|
|||||||
+1
-5
@@ -101,7 +101,6 @@ Game::Game(GuiInterface* gui, boost::shared_ptr<EngineFactory> factory,
|
|||||||
playerArray.push_back(tmpPlayer);
|
playerArray.push_back(tmpPlayer);
|
||||||
if(startQuantityPlayers > i) {
|
if(startQuantityPlayers > i) {
|
||||||
activePlayerList->push_back(tmpPlayer);
|
activePlayerList->push_back(tmpPlayer);
|
||||||
// runningPlayerList->push_back(tmpPlayer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(*runningPlayerList) = (*activePlayerList);
|
(*runningPlayerList) = (*activePlayerList);
|
||||||
@@ -164,10 +163,7 @@ void Game::initHand()
|
|||||||
}
|
}
|
||||||
|
|
||||||
runningPlayerList->clear();
|
runningPlayerList->clear();
|
||||||
|
(*runningPlayerList) = (*activePlayerList);
|
||||||
for(it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
|
|
||||||
runningPlayerList->push_back(*it);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hand erstellen
|
// Hand erstellen
|
||||||
actualHand = myFactory->createHand(myFactory, myGui, actualBoard, playerArray, activePlayerList, runningPlayerList, actualHandID, startQuantityPlayers, dealerPosition, actualSmallBlind, startCash);
|
actualHand = myFactory->createHand(myFactory, myGui, actualBoard, playerArray, activePlayerList, runningPlayerList, actualHandID, startQuantityPlayers, dealerPosition, actualSmallBlind, startCash);
|
||||||
|
|||||||
Reference in New Issue
Block a user