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