diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index cfce771f..515674eb 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -96,7 +96,7 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // !!!!!!!!!!!!!!!!!!!!!!!!!!!!! DEBUGGER !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // - if(DEBUG_MODE) { + if(DEBUG_MODE) { //QSqlDatabase *mySqliteLogDb; @@ -118,11 +118,11 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI case 1: { - tempBoardArray[0] = 39; - tempBoardArray[1] = 2; - tempBoardArray[2] = 3; - tempBoardArray[3] = 4; - tempBoardArray[4] = 5; + tempBoardArray[0] = 4; + tempBoardArray[1] = 19; + tempBoardArray[2] = 20; + tempBoardArray[3] = 43; + tempBoardArray[4] = 49; myBoard->setMyCards(tempBoardArray); @@ -135,8 +135,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player0 it = seatsList->begin(); - tempPlayerArray[0] = 13; - tempPlayerArray[1] = 14; + tempPlayerArray[0] = 18; + tempPlayerArray[1] = 17; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -148,8 +148,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player1 it++; - tempPlayerArray[0] = 18; - tempPlayerArray[1] = 17; + tempPlayerArray[0] = 31; + tempPlayerArray[1] = 8; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -426,22 +426,22 @@ void LocalHand::assignButtons() { nextActivePlayerFound = true; if(activePlayerList->size() > 2) { //small blind normal - (*it)->setMyButton(2); + (*it)->setMyButton(2); } else { //big blind in heads up (*it)->setMyButton(3); // lastPlayerAction for showing cards - lastActionPlayer = (*it)->getMyUniqueID(); } + // first player after dealer have to show his cards first (in showdown) + lastActionPlayer = (*it)->getMyUniqueID(); + it++; if(it == activePlayerList->end()) it = activePlayerList->begin(); if(activePlayerList->size() > 2) { //big blind normal (*it)->setMyButton(3); - // lastPlayerAction for showing cards - lastActionPlayer = (*it)->getMyUniqueID(); } else { //small blind in heads up (*it)->setMyButton(2); diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index 3e42e4d5..1cc78254 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -861,31 +861,31 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq switch(myUniqueID) { case 0: { - myCash=1000; + myCash=2588; } break; case 1: { - myCash=1000; + myCash=0; } break; case 2: { - myCash=1000; + myCash=404; } break; case 3: { - myCash=2000; + myCash=0; } break; case 4: { - myCash=3000; + myCash=0; } break; case 5: { - myCash=2000; + myCash=1133; } break; case 6: { - myCash=2100; + myCash=5275; } break; case 7: { - myCash=500; + myCash=0; } break; case 8: { - myCash=1000; + myCash=0; } break; case 9: { myCash=0; @@ -1356,8 +1356,8 @@ void LocalPlayer::preflopEngine() { switch(currentHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_CALL; - // raise = 20; + myAction = PLAYER_ACTION_RAISE; + raise = 20000; // if(mySet >= 40) { // myAction = PLAYER_ACTION_CALL; // } @@ -1425,8 +1425,8 @@ void LocalPlayer::preflopEngine() { break; case 5: { // if(mySet == 0) { - myAction = PLAYER_ACTION_CALL; - raise = 20; + myAction = PLAYER_ACTION_FOLD; +// raise = 20; // } } break; @@ -3095,18 +3095,26 @@ void LocalPlayer::evaluation(int bet, int raise) { } // all in if(highestSet + raise >= myCash + mySet) { - // -> full bet rule if(highestSet + currentHand->getCurrentBeRo()->getMinimumRaise() > myCash + mySet) { - currentHand->getCurrentBeRo()->setFullBetRule(true); - } else { - // lastPlayerAction für Karten umblättern reihenfolge setzrn - currentHand->setLastActionPlayer(myUniqueID); + // perhaps full bet rule + if(highestSet >= myCash + mySet) { + // only call all-in + mySet += myCash; + myCash = 0; + myAction = 6; + } else { + // raise, but not enough --> full bet rule + currentHand->getCurrentBeRo()->setFullBetRule(true); + // lastPlayerAction für Karten umblättern reihenfolge setzrn + currentHand->setLastActionPlayer(myUniqueID); + + mySet += myCash; + currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet); + myCash = 0; + myAction = 6; + highestSet = mySet; + } } - mySet += myCash; - currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet); - myCash = 0; - myAction = 6; - if(mySet > highestSet) highestSet = mySet; } // sonst else { diff --git a/src/game.cpp b/src/game.cpp index dfabe72a..f8695214 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -42,10 +42,10 @@ Game::Game(GuiInterface* gui, boost::shared_ptr factory, dealerPosition = startData.startDealerPlayerId; - if(DEBUG_MODE) { - startSmallBlind = 10; + if(DEBUG_MODE) { + startSmallBlind = 300; currentSmallBlind = startSmallBlind; - dealerPosition = 3; + dealerPosition = 5; } int i;