From eb38dd764026d5172560e17275eb0465db29a925 Mon Sep 17 00:00:00 2001 From: doitux Date: Sun, 12 Apr 2009 18:59:35 +0000 Subject: [PATCH] bugfix for http://www.pokerth.net/mantis/view.php?id=9 --- src/engine/local_engine/localhand.cpp | 20 +++++++++--------- src/engine/local_engine/localplayer.cpp | 24 ++++++++++++++++------ src/game.cpp | 2 +- src/gui/qt/gametable/gametableimpl.cpp | 2 +- src/gui/qt/startwindow/startwindowimpl.cpp | 2 +- 5 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index 2349d1c6..6c24af40 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -104,11 +104,11 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI case 1: { - tempBoardArray[0] = 3; - tempBoardArray[1] = 17; - tempBoardArray[2] = 18; - tempBoardArray[3] = 32; - tempBoardArray[4] = 33; + tempBoardArray[0] = 48; + tempBoardArray[1] = 10; + tempBoardArray[2] = 11; + tempBoardArray[3] = 1; + tempBoardArray[4] = 26; myBoard->setMyCards(tempBoardArray); @@ -121,8 +121,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player0 it = seatsList->begin(); - tempPlayerArray[0] = 11; - tempPlayerArray[1] = 12; + tempPlayerArray[0] = 24; + tempPlayerArray[1] = 45; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -134,15 +134,15 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player1 it++; -/* tempPlayerArray[0] = 12; - tempPlayerArray[1] = 48; + tempPlayerArray[0] = 38; + tempPlayerArray[1] = 27; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; (*it)->setMyCards(tempPlayerArray); (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); - (*it)->setMyBestHandPosition(temp5Array);*/ + (*it)->setMyBestHandPosition(temp5Array); // player2 it++; diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index 7d13f3fa..cd48f93c 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -859,10 +859,10 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq switch(myUniqueID) { case 0: { - myCash=2000; + myCash=23110; } break; case 1: { - myCash=0; + myCash=1320; } break; case 2: { myCash=0; @@ -877,8 +877,18 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq myCash=0; } break; case 6: { - myCash=1500; + myCash=0; } break; + case 7: { + myCash=0; + } break; + case 8: { + myCash=0; + } break; + case 9: { + myCash=0; + } break; + default: { } @@ -1277,7 +1287,7 @@ void LocalPlayer::preflopEngine() { switch(currentHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_CALL; + myAction = PLAYER_ACTION_CHECK; // raise = 3000; } break; @@ -1666,7 +1676,8 @@ void LocalPlayer::flopEngine() { switch(currentHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_CHECK; + myAction = PLAYER_ACTION_BET; + bet = 640; // if(currentHand->getCurrentBeRo()->getHighestSet() > 0) { // myAction = PLAYER_ACTION_CALL; // } @@ -2331,7 +2342,8 @@ void LocalPlayer::turnEngine() { switch(currentHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_FOLD; + myAction = PLAYER_ACTION_RAISE; + raise = 40; // if(currentHand->getCurrentBeRo()->getHighestSet() > 100) { // myAction = PLAYER_ACTION_FOLD; // } diff --git a/src/game.cpp b/src/game.cpp index 7044b081..e2c0f1cf 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -41,7 +41,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr factory, blindsList = myGameData.manualBlindsList; if(DEBUG_MODE) { - startSmallBlind = 10; + startSmallBlind = 320; currentSmallBlind = startSmallBlind; } diff --git a/src/gui/qt/gametable/gametableimpl.cpp b/src/gui/qt/gametable/gametableimpl.cpp index 9481a044..e0781cb7 100755 --- a/src/gui/qt/gametable/gametableimpl.cpp +++ b/src/gui/qt/gametable/gametableimpl.cpp @@ -2404,7 +2404,7 @@ void gameTableImpl::nextRoundCleanGui() { flipHolecardsAllInAlreadyDone = FALSE; //Wenn Pause zwischen den Hands in der Konfiguration steht den Stop Button drücken! - if (myConfig->readConfigInt("PauseBetweenHands") && blinkingStartButtonAnimationTimer->isActive() == FALSE && myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) { + if (myConfig->readConfigInt("PauseBetweenHands") /*&& blinkingStartButtonAnimationTimer->isActive() == FALSE*/ && myStartWindow->getSession()->getGameType() == Session::GAME_TYPE_LOCAL) { pushButton_break->click(); } else { diff --git a/src/gui/qt/startwindow/startwindowimpl.cpp b/src/gui/qt/startwindow/startwindowimpl.cpp index d245b1ea..056d85ef 100644 --- a/src/gui/qt/startwindow/startwindowimpl.cpp +++ b/src/gui/qt/startwindow/startwindowimpl.cpp @@ -279,7 +279,7 @@ void startWindowImpl::startNewLocalGame(newGameDialogImpl *v) { startData.numberOfPlayers = gameData.maxNumberOfPlayers; Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0); if(DEBUG_MODE) { - tmpDealerPos = 1; + tmpDealerPos = 0; } startData.startDealerPlayerId = static_cast(tmpDealerPos);