firstRunGui
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
virtual bool getFirstRound() const =0;
|
||||
|
||||
virtual void resetFirstRun() =0;
|
||||
virtual void skipFirstRunGui() =0;
|
||||
|
||||
virtual void nextPlayer() =0;
|
||||
virtual void run() =0;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
using namespace std;
|
||||
|
||||
LocalBeRo::LocalBeRo(HandInterface* hi, int id, unsigned dP, int sB, GameState gS)
|
||||
: BeRoInterface(), myHand(hi), myBeRoID(gS), myID(id), dealerPosition(dP), smallBlindPosition(0), dealerPositionId(dP), smallBlindPositionId(0), bigBlindPositionId(0), smallBlind(sB), highestSet(false), minimumRaise(2*sB), firstRun(true), firstRound(true), firstHeadsUpRound(true), currentPlayersTurnId(0), firstRoundLastPlayersTurnId(0), logBoardCardsDone(false)
|
||||
: BeRoInterface(), myHand(hi), myBeRoID(gS), myID(id), dealerPosition(dP), smallBlindPosition(0), dealerPositionId(dP), smallBlindPositionId(0), bigBlindPositionId(0), smallBlind(sB), highestSet(false), minimumRaise(2*sB), firstRun(true), firstRunGui(true), firstRound(true), firstHeadsUpRound(true), currentPlayersTurnId(0), firstRoundLastPlayersTurnId(0), logBoardCardsDone(false)
|
||||
{
|
||||
currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||
lastPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||
@@ -92,11 +92,15 @@ void LocalBeRo::nextPlayer() {
|
||||
|
||||
void LocalBeRo::run() {
|
||||
|
||||
if (firstRun) {
|
||||
if (firstRun || firstRunGui) {
|
||||
|
||||
// HACK
|
||||
if(firstRunGui) {
|
||||
firstRunGui = false;
|
||||
myHand->getGuiInterface()->dealBeRoCards(myBeRoID);
|
||||
}
|
||||
|
||||
myHand->getGuiInterface()->dealBeRoCards(myBeRoID);
|
||||
firstRun = false;
|
||||
|
||||
/*
|
||||
|
||||
// determine smallBlindPosition
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
void setMinimumRaise ( int theValue ) { minimumRaise = theValue; }
|
||||
int getMinimumRaise() const { return minimumRaise; }
|
||||
|
||||
void resetFirstRun() { firstRun = false; }
|
||||
void skipFirstRunGui() { firstRunGui = false; }
|
||||
|
||||
void nextPlayer();
|
||||
void run();
|
||||
@@ -116,6 +116,7 @@ private:
|
||||
int minimumRaise;
|
||||
|
||||
bool firstRun;
|
||||
bool firstRunGui; // HACK
|
||||
bool firstRound;
|
||||
bool firstHeadsUpRound;
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ ClientBeRo::getMinimumRaise() const
|
||||
|
||||
|
||||
void
|
||||
ClientBeRo::resetFirstRun()
|
||||
ClientBeRo::skipFirstRunGui()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
int getMinimumRaise() const;
|
||||
|
||||
|
||||
void resetFirstRun();
|
||||
void skipFirstRunGui();
|
||||
|
||||
void nextPlayer();
|
||||
void run();
|
||||
|
||||
@@ -440,9 +440,9 @@ ServerGameStateStartHand::Process(ServerGameThread &server)
|
||||
curGame.initHand();
|
||||
|
||||
// HACK: Skip GUI notification run
|
||||
curGame.getCurrentHand()->getFlop()->resetFirstRun();
|
||||
curGame.getCurrentHand()->getTurn()->resetFirstRun();
|
||||
curGame.getCurrentHand()->getRiver()->resetFirstRun();
|
||||
curGame.getCurrentHand()->getFlop()->skipFirstRunGui();
|
||||
curGame.getCurrentHand()->getTurn()->skipFirstRunGui();
|
||||
curGame.getCurrentHand()->getRiver()->skipFirstRunGui();
|
||||
|
||||
// Consider all players, even inactive.
|
||||
PlayerListIterator i = curGame.getSeatsList()->begin();
|
||||
|
||||
Reference in New Issue
Block a user