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
@@ -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;