Resetting cards value on client side each hand. Added GUI synchronization function. Fixed update of pot when all but one fold. Reset sets on end of hand.

This commit is contained in:
lotodore
2007-06-10 12:46:29 +00:00
parent 6c9e6a6a28
commit b624714f5d
9 changed files with 58 additions and 11 deletions
+10
View File
@@ -584,6 +584,8 @@ mainWindowImpl::mainWindowImpl(ConfigFile *c, QMainWindow *parent)
connect(this, SIGNAL(signalRefreshButton()), this, SLOT(refreshButton()));
connect(this, SIGNAL(signalRefreshGameLabels(int)), this, SLOT(refreshGameLabels(int)));
connect(this, SIGNAL(signalGuiUpdateDone()), this, SLOT(guiUpdateDone()));
connect(this, SIGNAL(signalMeInAction()), this, SLOT(meInAction()));
connect(this, SIGNAL(signalDisableMyButtons()), this, SLOT(disableMyButtons()));
connect(this, SIGNAL(signalStartTimeoutAnimation(int, int)), this, SLOT(startTimeoutAnimation(int, int)));
@@ -1251,6 +1253,14 @@ void mainWindowImpl::refreshPot() {
textLabel_Pot->setText("<span style='font-weight:bold'>"+QString::number(currentHand->getBoard()->getPot(),10)+" $</span>");
}
void mainWindowImpl::guiUpdateDone() {
guiUpdateSemaphore.release();
}
void mainWindowImpl::waitForGuiUpdateDone() {
guiUpdateSemaphore.acquire();
}
void mainWindowImpl::dealHoleCards() {
QPixmap onePix(":/graphics/resources/graphics/1px.png");
+6 -1
View File
@@ -85,6 +85,8 @@ signals:
void signalRefreshButton();
void signalRefreshGameLabels(int);
void signalGuiUpdateDone();
void signalMeInAction();
void signalDisableMyButtons();
void signalStartTimeoutAnimation(int playerId, int timeoutSec);
@@ -140,6 +142,9 @@ public slots:
void refreshButton();
void refreshPlayerAvatar();
void guiUpdateDone();
void waitForGuiUpdateDone();
// Karten-Funktionen
void dealHoleCards();
@@ -390,7 +395,7 @@ private:
// statistic testing
int statisticArray[15];
QSemaphore guiUpdateSemaphore;
friend class GuiWrapper;
};