adds activePlayerList and runningPlayerList (XIV) - !!! BROKEN !!! - last sable rev866

This commit is contained in:
doitux
2007-09-26 19:45:58 +00:00
parent 7bbf76fe5d
commit 1f21fe815e
23 changed files with 252 additions and 79 deletions
+29 -1
View File
@@ -26,7 +26,7 @@
using namespace std;
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
: myFactory(f), myGui(g), myBoard(b), playerArray(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(false),
cardsShown(false), bettingRoundsPlayed(0)
{
@@ -495,3 +495,31 @@ void LocalHand::switchRounds() {
}
}
PlayerListIterator LocalHand::getActivePlayerIt(unsigned uniqueId) const {
PlayerListIterator it;
for(it=activePlayerList->begin(); it!=activePlayerList->end(); it++) {
if((*it)->getMyUniqueID() == uniqueId) {
break;
}
}
return it;
}
PlayerListIterator LocalHand::getRunningPlayerIt(unsigned uniqueId) const {
PlayerListIterator it;
for(it=runningPlayerList->begin(); it!=runningPlayerList->end(); it++) {
if((*it)->getMyUniqueID() == uniqueId) {
break;
}
}
return it;
}