delete some bug for determining the list of player who have to show their cards. additionally the lastActionPlayer is now determined correctly (especially in every betting roud)

This commit is contained in:
floty
2010-07-22 21:17:22 +00:00
parent 53247a007a
commit 7f3e3f6dfd
11 changed files with 63 additions and 32 deletions
+5 -3
View File
@@ -31,7 +31,7 @@
using namespace std;
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
: myFactory(f), myGui(g), myBoard(b), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(-1), allInCondition(false),
: myFactory(f), myGui(g), myBoard(b), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(-1), lastActionPlayer(0), allInCondition(false),
cardsShown(false), bettingRoundsPlayed(0)
{
@@ -431,7 +431,7 @@ void LocalHand::assignButtons() {
//big blind in heads up
(*it)->setMyButton(3);
// lastPlayerAction for showing cards
// getCurrentBeRo()->setLastActionPlayer((*it)->getMyUniqueID());
lastActionPlayer = (*it)->getMyUniqueID();
}
it++;
@@ -441,7 +441,7 @@ void LocalHand::assignButtons() {
//big blind normal
(*it)->setMyButton(3);
// lastPlayerAction for showing cards
// getCurrentBeRo()->setLastActionPlayer((*it)->getMyUniqueID());
lastActionPlayer = (*it)->getMyUniqueID();
} else {
//small blind in heads up
(*it)->setMyButton(2);
@@ -455,6 +455,8 @@ void LocalHand::assignButtons() {
throw LocalException(__FILE__, __LINE__, ERR_NEXT_ACTIVE_PLAYER_NOT_FOUND);
}
// cout << "lAP-Button: " << lastActionPlayer << endl;
//do sets --> TODO switch?
for (it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); it_c++) {