flip holcards when all active players all in

This commit is contained in:
doitux
2007-01-29 09:11:44 +00:00
parent dfa1f32bb2
commit 48019eaa63
6 changed files with 47 additions and 1 deletions
+1
View File
@@ -79,6 +79,7 @@ public:
virtual void postRiverAnimation1() const=0;
virtual void postRiverRunAnimation1() const=0;
// virtual void postRiverAnimation2() const=0;
virtual void flipHolecardsAllIn() const=0;
// virtual void handSwitchRounds() const=0;
//
+2
View File
@@ -80,6 +80,8 @@ void GuiWrapper::riverAnimation2() const { myW->riverAnimation2(); }
void GuiWrapper::postRiverAnimation1() const { myW->postRiverAnimation1(); }
void GuiWrapper::postRiverRunAnimation1() const { myW->postRiverRunAnimation1(); }
void GuiWrapper::flipHolecardsAllIn() const { myW->flipHolecardsAllIn(); }
void GuiWrapper::nextRoundCleanGui() const { myW->nextRoundCleanGui(); }
void GuiWrapper::meInAction() const { myW->meInAction(); }
+2
View File
@@ -77,6 +77,8 @@ public:
void postRiverAnimation1() const;
void postRiverRunAnimation1() const;
void flipHolecardsAllIn() const;
void nextRoundCleanGui() const;
void meInAction() const;
+38
View File
@@ -1430,6 +1430,44 @@ void mainWindowImpl::postRiverRunAnimation6() {
postRiverRunAnimation6Timer->start(newRoundSpeed);
}
void mainWindowImpl::flipHolecardsAllIn() {
int i;
//Aktive Spieler zählen --> wenn nur noch einer nicht-folded dann keine Karten umdrehen
int activePlayersCounter = 0;
for (i=0; i<maxQuantityPlayers; i++) {
if (actualHand->getPlayerArray()[i]->getMyAction() != 1 && actualHand->getPlayerArray()[i]->getMyActiveStatus() == 1) activePlayersCounter++;
}
if(activePlayersCounter!=1) {
//Karten der aktiven Spieler umdrehen
QPixmap onePix(":/graphics/cards/1px.png");
//TempArrays
QPixmap tempCardsPixmapArray[2];
int tempCardsIntArray[2];
int i, j;
for(i=1; i<maxQuantityPlayers; i++) {
actualHand->getPlayerArray()[i]->getMyCards(tempCardsIntArray);
for(j=0; j<2; j++) {
if(actualHand->getPlayerArray()[i]->getMyActiveStatus() && actualHand->getPlayerArray()[i]->getMyAction() != 1) {
tempCardsPixmapArray[j].load(":/othercards/cards/othercards/"+QString::number(tempCardsIntArray[j], 10)+".png");
holeCardsArray[i][j]->setPixmap(tempCardsPixmapArray[j], FALSE);
}
}
}
}
}
void mainWindowImpl::startNewHand() {
if( !breakAfterActualHand){ actualGame->startHand();
+3 -1
View File
@@ -136,7 +136,9 @@ public slots:
void postRiverRunAnimation3();
void postRiverRunAnimation4();
void postRiverRunAnimation5();
void postRiverRunAnimation6();
void postRiverRunAnimation6();
void flipHolecardsAllIn();
void handSwitchRounds();