earlier pre-action selection also in network game special for floty ;-)

This commit is contained in:
doitux
2007-11-03 23:15:54 +00:00
parent 9de1712aa9
commit eb5b3e7604
2 changed files with 15 additions and 11 deletions
+13 -9
View File
@@ -1652,7 +1652,7 @@ void mainWindowImpl::dealFlopCards6() {
if(mySession->getCurrentGame()->getCurrentHand()->getAllInCondition()) { dealFlopCards6Timer->start(AllInDealCardsSpeed); } if(mySession->getCurrentGame()->getCurrentHand()->getAllInCondition()) { dealFlopCards6Timer->start(AllInDealCardsSpeed); }
// sonst normale Variante // sonst normale Variante
else { else {
updateMyButtonsState(); updateMyButtonsState(0); //mode 0 == called from dealberocards
dealFlopCards6Timer->start(postDealCardsSpeed); dealFlopCards6Timer->start(postDealCardsSpeed);
} }
} }
@@ -1689,7 +1689,7 @@ void mainWindowImpl::dealTurnCards2() {
} }
// sonst normale Variante // sonst normale Variante
else { else {
updateMyButtonsState(); updateMyButtonsState(0); //mode 0 == called from dealberocards
dealTurnCards2Timer->start(postDealCardsSpeed); dealTurnCards2Timer->start(postDealCardsSpeed);
} }
@@ -1727,12 +1727,12 @@ void mainWindowImpl::dealRiverCards2() {
if(mySession->getCurrentGame()->getCurrentHand()->getAllInCondition()) { dealRiverCards2Timer->start(AllInDealCardsSpeed); } if(mySession->getCurrentGame()->getCurrentHand()->getAllInCondition()) { dealRiverCards2Timer->start(AllInDealCardsSpeed); }
// sonst normale Variante // sonst normale Variante
else { else {
updateMyButtonsState(); updateMyButtonsState(0); //mode 0 == called from dealberocards
dealRiverCards2Timer->start(postDealCardsSpeed); dealRiverCards2Timer->start(postDealCardsSpeed);
} }
} }
void mainWindowImpl::provideMyActions() { void mainWindowImpl::provideMyActions(int mode) {
QString pushButtonFoldString; QString pushButtonFoldString;
QString pushButtonBetRaiseString; QString pushButtonBetRaiseString;
@@ -1744,8 +1744,12 @@ void mainWindowImpl::provideMyActions() {
Game *currentGame = mySession->getCurrentGame(); Game *currentGame = mySession->getCurrentGame();
HandInterface *currentHand = currentGame->getCurrentHand(); HandInterface *currentHand = currentGame->getCurrentHand();
//really disabled buttons if human player is fold/all-in or // cout << "provideMyActions get myAction" << currentHand->getSeatsList()->front()->getMyAction() << endl;
if(/*pushButton_BetRaise->isCheckable() && */(currentHand->getSeatsList()->front()->getMyAction() == PLAYER_ACTION_ALLIN || currentHand->getSeatsList()->front()->getMyAction() == PLAYER_ACTION_FOLD || (currentGame->getSeatsList()->front()->getMySet() == currentHand->getCurrentBeRo()->getHighestSet() && (currentGame->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_NONE)))) { // cout << "provideMyActions get mySet" << currentGame->getSeatsList()->front()->getMySet() << endl;
// cout << "provideMyActions get HighestSet" << currentHand->getCurrentBeRo()->getHighestSet() << endl;
//really disabled buttons if human player is fold/all-in or ... and not called from dealberocards
if(/*pushButton_BetRaise->isCheckable() && */mode != 0 && (currentHand->getSeatsList()->front()->getMyAction() == PLAYER_ACTION_ALLIN || currentHand->getSeatsList()->front()->getMyAction() == PLAYER_ACTION_FOLD || (currentGame->getSeatsList()->front()->getMySet() == currentHand->getCurrentBeRo()->getHighestSet() && (currentGame->getSeatsList()->front()->getMyAction() != PLAYER_ACTION_NONE)))) {
pushButton_BetRaise->setText(""); pushButton_BetRaise->setText("");
pushButton_CallCheck->setText(""); pushButton_CallCheck->setText("");
@@ -3515,8 +3519,8 @@ void mainWindowImpl::mouseOverFlipCards(bool front) {
} }
} }
void mainWindowImpl::updateMyButtonsState() { void mainWindowImpl::updateMyButtonsState(int mode) {
HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand(); HandInterface *currentHand = mySession->getCurrentGame()->getCurrentHand();
if(currentHand->getLastPlayersTurn() == 0) { if(currentHand->getLastPlayersTurn() == 0) {
@@ -3525,7 +3529,7 @@ void mainWindowImpl::updateMyButtonsState() {
} }
else { else {
myButtonsCheckable(TRUE); myButtonsCheckable(TRUE);
provideMyActions(); provideMyActions(mode);
} }
} }
+2 -2
View File
@@ -185,7 +185,7 @@ public slots:
void dealHoleCards(); void dealHoleCards();
//Spieler-Funktionen //Spieler-Funktionen
void provideMyActions(); void provideMyActions(int mode = -1); //mode 0 == called from dealberocards
void meInAction(); void meInAction();
void disableMyButtons(); void disableMyButtons();
void startTimeoutAnimation(int playerId, int timoutSec); void startTimeoutAnimation(int playerId, int timoutSec);
@@ -318,7 +318,7 @@ public slots:
void mouseOverFlipCards(bool front); void mouseOverFlipCards(bool front);
void updateMyButtonsState(); void updateMyButtonsState(int mode = -1); //mode 0 == called from dealberocards
void uncheckMyButtons(); void uncheckMyButtons();
void resetMyButtonsCheckStateMemory(); void resetMyButtonsCheckStateMemory();
void clearMyButtons(); void clearMyButtons();