actual -> current ;)

This commit is contained in:
floty
2007-10-18 17:40:12 +00:00
parent ecb9f91a72
commit 06a8fd5730
21 changed files with 2222 additions and 2222 deletions
+2 -2
View File
@@ -59,8 +59,8 @@ public:
virtual void setStartQuantityPlayers(int theValue) =0;
virtual int getStartQuantityPlayers() const =0;
virtual void setActualRound(int theValue) =0;
virtual int getActualRound() const =0;
virtual void setCurrentRound(int theValue) =0;
virtual int getCurrentRound() const =0;
virtual void setDealerPosition(int theValue) =0;
virtual int getDealerPosition() const =0;
+2 -2
View File
@@ -274,7 +274,7 @@ void LocalBeRo::run() {
// aktuelle bero nicht dran, weil alle Sets gleich sind
//also gehe in naechste bero
myHand->setActualRound(myBeRoID+1);
myHand->setCurrentRound(myBeRoID+1);
//Action loeschen und ActionButtons refresh
// for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
@@ -322,7 +322,7 @@ void LocalBeRo::run() {
//// !!!!!!!!! attention: exception if player failed before !!!!!!!!
// if( !(myHand->getActualQuantityPlayers() < 3 && firstHeadsUpRound == 1) || myHand->getPlayerArray()[playersTurn]->getMyActiveStatus() == 0 ) {
// if( !(myHand->getCurrentQuantityPlayers() < 3 && firstHeadsUpRound == 1) || myHand->getPlayerArray()[playersTurn]->getMyActiveStatus() == 0 ) {
// not first round in heads up (for headsup dealer is smallblind so it is dealers turn)
// naechsten Spieler ermitteln
+2 -2
View File
@@ -306,10 +306,10 @@ void LocalBeRoPreflop::run() {
// Preflop nicht dran, weil wir nicht mehr in erster PreflopRunde und alle Sets gleich sind
//also gehe in Flop
getMyHand()->setActualRound(GAME_STATE_FLOP);
getMyHand()->setCurrentRound(GAME_STATE_FLOP);
// exception no.1 - see above
// if(getMyHand()->getAllInCondition()) getMyHand()->setActualRound(GAME_STATE_PREFLOP);;
// if(getMyHand()->getAllInCondition()) getMyHand()->setCurrentRound(GAME_STATE_PREFLOP);;
//Action loeschen und ActionButtons refresh
for(it_c=getMyHand()->getRunningPlayerList()->begin(); it_c!=getMyHand()->getRunningPlayerList()->end(); it_c++) {
+14 -14
View File
@@ -30,7 +30,7 @@
using namespace std;
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl_old, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
: myFactory(f), myGui(g), myBoard(b), playerArray(sl_old), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(false),
: myFactory(f), myGui(g), myBoard(b), playerArray(sl_old), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(0), smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(false),
cardsShown(false), bettingRoundsPlayed(0)
{
@@ -551,7 +551,7 @@ void LocalHand::switchRounds() {
myBoard->collectPot();
myGui->refreshPot();
myGui->refreshSet();
actualRound = 4;
currentRound = 4;
}
// prfen der All In Kondition
// fr All In Prozedur mssen mindestens zwei aktive Player vorhanden sein
@@ -568,7 +568,7 @@ void LocalHand::switchRounds() {
// TODO -> runningPlayerList s.u.
// for(i=0; i<MAX_NUMBER_OF_PLAYERS; i++) {
//
// if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1 && playerArray[i]->getMySet() >= myBeRo[actualRound]->getHighestSet()) {
// if(playerArray[i]->getMyAction() != 1 && playerArray[i]->getMyAction() != 6 && playerArray[i]->getMyActiveStatus() == 1 && playerArray[i]->getMySet() >= myBeRo[currentRound]->getHighestSet()) {
// allInCondition = 1;
// }
//
@@ -577,13 +577,13 @@ void LocalHand::switchRounds() {
for(it_c=runningPlayerList->begin(); it_c!=runningPlayerList->end(); it_c++) {
if((*it_c)->getMySet() >= myBeRo[actualRound]->getHighestSet()) {
if((*it_c)->getMySet() >= myBeRo[currentRound]->getHighestSet()) {
allInCondition = true;
}
}
// if( (*(runningPlayerList.begin()))->getMySet() >= myBeRo[actualRound]->getHighestSet() ) {
// if( (*(runningPlayerList.begin()))->getMySet() >= myBeRo[currentRound]->getHighestSet() ) {
// allInCondition = 1;
// }
@@ -600,9 +600,9 @@ void LocalHand::switchRounds() {
// exception
// no.1: if in first Preflop Round next player is small blind and only all-in-big-blind with less than smallblind amount and other all-in players with less than small blind are nonfold too -> preflop is over
PlayerListConstIterator smallBlindIt_c = getRunningPlayerIt(myBeRo[actualRound]->getSmallBlindPositionId());
PlayerListConstIterator bigBlindIt_c = getActivePlayerIt(myBeRo[actualRound]->getBigBlindPositionId());
if(smallBlindIt_c!=runningPlayerList->end() && bigBlindIt_c!=activePlayerList->end() && actualRound == GAME_STATE_PREFLOP && myBeRo[actualRound]->getFirstRound()) {
PlayerListConstIterator smallBlindIt_c = getRunningPlayerIt(myBeRo[currentRound]->getSmallBlindPositionId());
PlayerListConstIterator bigBlindIt_c = getActivePlayerIt(myBeRo[currentRound]->getBigBlindPositionId());
if(smallBlindIt_c!=runningPlayerList->end() && bigBlindIt_c!=activePlayerList->end() && currentRound == GAME_STATE_PREFLOP && myBeRo[currentRound]->getFirstRound()) {
// determine player who are all in with less than small blind amount
int tempCounter = 0;
for(it_c=activePlayerList->begin(); it_c!=activePlayerList->end(); it_c++) {
@@ -637,15 +637,15 @@ void LocalHand::switchRounds() {
myGui->refreshSet();
myGui->flipHolecardsAllIn();
if (actualRound < 4) // do not increment past 4
actualRound++;
if (currentRound < 4) // do not increment past 4
currentRound++;
//log board cards for allin
if(actualRound >= 1) {
if(currentRound >= 1) {
int tempBoardCardsArray[5];
myBoard->getMyCards(tempBoardCardsArray);
myGui->logDealBoardCardsMsg(actualRound, tempBoardCardsArray[0], tempBoardCardsArray[1], tempBoardCardsArray[2], tempBoardCardsArray[3], tempBoardCardsArray[4]);
myGui->logDealBoardCardsMsg(currentRound, tempBoardCardsArray[0], tempBoardCardsArray[1], tempBoardCardsArray[2], tempBoardCardsArray[3], tempBoardCardsArray[4]);
}
}
@@ -664,13 +664,13 @@ void LocalHand::switchRounds() {
}
myGui->refreshGameLabels((GameState)getActualRound());
myGui->refreshGameLabels((GameState)getCurrentRound());
// /*/*/*/*cout <<*/*/*/*/ "NextPlayerSpeed1 stop" << endl;
//
// cout << "NextPlayerSpeed2 start" << endl;
switch(actualRound) {
switch(currentRound) {
case 0: {
// Preflop starten
myGui->preflopAnimation1();
+4 -4
View File
@@ -54,7 +54,7 @@ public:
boost::shared_ptr<BeRoInterface> getTurn() const { return myBeRo[GAME_STATE_TURN]; }
boost::shared_ptr<BeRoInterface> getRiver() const { return myBeRo[GAME_STATE_RIVER]; }
GuiInterface* getGuiInterface() const { return myGui; }
boost::shared_ptr<BeRoInterface> getCurrentBeRo() const { return myBeRo[actualRound]; }
boost::shared_ptr<BeRoInterface> getCurrentBeRo() const { return myBeRo[currentRound]; }
void setMyID(int theValue) { myID = theValue; }
int getMyID() const { return myID; }
@@ -62,8 +62,8 @@ public:
void setStartQuantityPlayers(int theValue) { startQuantityPlayers = theValue; }
int getStartQuantityPlayers() const { return startQuantityPlayers; }
void setActualRound(int theValue) { actualRound = theValue; }
int getActualRound() const { return actualRound; }
void setCurrentRound(int theValue) { currentRound = theValue; }
int getCurrentRound() const { return currentRound; }
void setDealerPosition(int theValue) { dealerPosition = theValue; }
int getDealerPosition() const { return dealerPosition; }
@@ -107,7 +107,7 @@ private:
int myID;
int startQuantityPlayers;
unsigned dealerPosition; // -1 -> neutral
int actualRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river
int currentRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river
int smallBlind;
int startCash;
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -67,7 +67,7 @@ public:
void setMyAction(int theValue, bool blind = 0) {
myAction = theValue;
// logging for human player
if(myAction && !blind) actualHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
}
int getMyAction() const { return myAction; }
@@ -88,11 +88,11 @@ public:
// log flipping cards
if(myCardsFlip) {
switch(state) {
case 1: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
break;
case 2: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
break;
case 3: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
break;
default: ;
}
@@ -143,7 +143,7 @@ public:
void setMyWinnerState ( bool theValue, int pot ) {
if(theValue) myWinnerState = theValue;
actualHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
}
bool getMyWinnerState() const { return myWinnerState;}
@@ -179,8 +179,8 @@ public:
private:
ConfigFile *myConfig;
HandInterface *actualHand;
BoardInterface *actualBoard;
HandInterface *currentHand;
BoardInterface *currentBoard;
CardsValue *myCardsValue;
+2 -2
View File
@@ -24,7 +24,7 @@
using namespace std;
ClientBoard::ClientBoard()
: playerArray(0), actualHand(0), pot(0), sets(0)
: playerArray(0), currentHand(0), pot(0), sets(0)
{
}
@@ -47,7 +47,7 @@ void
ClientBoard::setHand(HandInterface* br)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
actualHand = br;
currentHand = br;
}
void
+1 -1
View File
@@ -60,7 +60,7 @@ private:
PlayerList activePlayerList;
PlayerList runningPlayerList;
HandInterface *actualHand;
HandInterface *currentHand;
std::list<int> winners;
+6 -6
View File
@@ -22,7 +22,7 @@
using namespace std;
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl_old, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC)
: myFactory(f), myGui(g), myBoard(b), playerArray(sl_old), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
: myFactory(f), myGui(g), myBoard(b), playerArray(sl_old), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(0),
smallBlind(sB), startCash(sC), lastPlayersTurn(0), allInCondition(0),
cardsShown(false), bettingRoundsPlayed(0)
{
@@ -166,7 +166,7 @@ ClientHand::getRiver() const
boost::shared_ptr<BeRoInterface>
ClientHand::getCurrentBeRo() const
{
return myBeRo[actualRound];
return myBeRo[currentRound];
}
@@ -205,17 +205,17 @@ ClientHand::getStartQuantityPlayers() const
}
void
ClientHand::setActualRound(int theValue)
ClientHand::setCurrentRound(int theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
actualRound = theValue;
currentRound = theValue;
}
int
ClientHand::getActualRound() const
ClientHand::getCurrentRound() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return actualRound;
return currentRound;
}
void
+6 -6
View File
@@ -57,14 +57,14 @@ class ClientHand : public HandInterface
void setMyID ( int theValue );
int getMyID() const;
void setActualQuantityPlayers ( int theValue );
int getActualQuantityPlayers() const;
void setCurrentQuantityPlayers ( int theValue );
int getCurrentQuantityPlayers() const;
void setStartQuantityPlayers ( int theValue );
int getStartQuantityPlayers() const;
void setActualRound ( int theValue );
int getActualRound() const;
void setCurrentRound ( int theValue );
int getCurrentRound() const;
void setDealerPosition ( int theValue );
int getDealerPosition() const;
@@ -106,8 +106,8 @@ class ClientHand : public HandInterface
int myID;
int startQuantityPlayers;
int dealerPosition; // -1 -> neutral
int actualRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river
unsigned dealerPosition;
int currentRound; //0 = preflop, 1 = flop, 2 = turn, 3 = river
int smallBlind;
int startCash;
+6 -6
View File
@@ -23,7 +23,7 @@ using namespace std;
ClientPlayer::ClientPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB)
: PlayerInterface(), myConfig(c), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
: PlayerInterface(), myConfig(c), currentHand(0), currentBoard(b), myCardsValue(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
{
}
@@ -37,7 +37,7 @@ void
ClientPlayer::setHand(HandInterface* br)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
actualHand = br;
currentHand = br;
}
int
@@ -244,11 +244,11 @@ ClientPlayer::setMyCardsFlip(bool theValue, int state)
// log flipping cards
if (myCardsFlip) {
switch(state) {
case 1: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
case 1: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt);
break;
case 2: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
case 2: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1]);
break;
case 3: actualHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
case 3: currentHand->getGuiInterface()->logFlipHoleCardsMsg(myName, myCards[0], myCards[1], myCardsValueInt, "has");
break;
default: ;
}
@@ -379,7 +379,7 @@ ClientPlayer::setMyWinnerState(bool theValue, int pot)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
if(theValue) myWinnerState = theValue;
actualHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
currentHand->getGuiInterface()->logPlayerWinsMsg(myName, pot, theValue);
}
bool
+2 -2
View File
@@ -132,8 +132,8 @@ private:
mutable boost::recursive_mutex m_syncMutex;
ConfigFile *myConfig;
HandInterface *actualHand;
BoardInterface *actualBoard;
HandInterface *currentHand;
BoardInterface *currentBoard;
CardsValue *myCardsValue;