diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index fedf82c0..485632fe 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -112,11 +112,11 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI case 1: { - tempBoardArray[0] = 22; - tempBoardArray[1] = 15; - tempBoardArray[2] = 24; - tempBoardArray[3] = 30; - tempBoardArray[4] = 23; + tempBoardArray[0] = 32; + tempBoardArray[1] = 24; + tempBoardArray[2] = 31; + tempBoardArray[3] = 47; + tempBoardArray[4] = 19; myBoard->setMyCards(tempBoardArray); @@ -129,15 +129,15 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player0 it = seatsList->begin(); -// tempPlayerArray[0] = 51; -// tempPlayerArray[1] = 20; -// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; -// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; -// -// (*it)->setMyCards(tempPlayerArray); -// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); -// -// (*it)->setMyBestHandPosition(temp5Array); + tempPlayerArray[0] = 12; + tempPlayerArray[1] = 44; + tempPlayerAndBoardArray[0] = tempPlayerArray[0]; + tempPlayerAndBoardArray[1] = tempPlayerArray[1]; + + (*it)->setMyCards(tempPlayerArray); + (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); + + (*it)->setMyBestHandPosition(temp5Array); // player1 it++; @@ -155,8 +155,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player2 it++; - tempPlayerArray[0] = 35; - tempPlayerArray[1] = 18; + tempPlayerArray[0] = 49; + tempPlayerArray[1] = 34; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -181,15 +181,15 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player4 it++; -// tempPlayerArray[0] = 25; -// tempPlayerArray[1] = 16; -// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; -// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; -// -// (*it)->setMyCards(tempPlayerArray); -// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); -// -// (*it)->setMyBestHandPosition(temp5Array); + tempPlayerArray[0] = 45; + tempPlayerArray[1] = 8; + tempPlayerAndBoardArray[0] = tempPlayerArray[0]; + tempPlayerAndBoardArray[1] = tempPlayerArray[1]; + + (*it)->setMyCards(tempPlayerArray); + (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); + + (*it)->setMyBestHandPosition(temp5Array); // player5 it++; @@ -207,15 +207,15 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player6 it++; - tempPlayerArray[0] = 13; - tempPlayerArray[1] = 49; - tempPlayerAndBoardArray[0] = tempPlayerArray[0]; - tempPlayerAndBoardArray[1] = tempPlayerArray[1]; - - (*it)->setMyCards(tempPlayerArray); - (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); - - (*it)->setMyBestHandPosition(temp5Array); +// tempPlayerArray[0] = 13; +// tempPlayerArray[1] = 49; +// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; +// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; +// +// (*it)->setMyCards(tempPlayerArray); +// (*it)->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); +// +// (*it)->setMyBestHandPosition(temp5Array); } break; diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index 7e6ea680..aab74948 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -857,25 +857,25 @@ LocalPlayer::LocalPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniq switch(myUniqueID) { case 0: { - myCash=0; + myCash=3000; } break; case 1: { - myCash=3120; + myCash=3000; } break; case 2: { - myCash=11280; + myCash=3000; } break; case 3: { - myCash=3550; + myCash=3000; } break; case 4: { - myCash=3020; + myCash=3000; } break; case 5: { - myCash=0; + myCash=3000; } break; case 6: { - myCash=30; + myCash=3000; } break; default: { } @@ -1202,7 +1202,7 @@ void LocalPlayer::preflopEngine() { switch(actualHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_FOLD; + myAction = PLAYER_ACTION_CALL; // raise = 3000; } break; @@ -1246,7 +1246,7 @@ void LocalPlayer::preflopEngine() { case 3: { switch(actualHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_CALL; + myAction = PLAYER_ACTION_FOLD; // raise = 20; // if(mySet >= 40) { // myAction = PLAYER_ACTION_CALL; @@ -1290,15 +1290,15 @@ void LocalPlayer::preflopEngine() { } break; case 5: { - if(mySet == 0) { -// myAction = PLAYER_ACTION_CALL; - } +// if(mySet == 0) { + myAction = PLAYER_ACTION_CALL; +// } } break; case 6: { - if(mySet == 160) { -// myAction = PLAYER_ACTION_CALL; - } +// if(mySet == 160) { + myAction = PLAYER_ACTION_FOLD; +// } } break; default: {} @@ -1571,7 +1571,7 @@ void LocalPlayer::flopEngine() { switch(actualHand->getMyID()) { case 1: { -// myAction = PLAYER_ACTION_CHECK; + myAction = PLAYER_ACTION_CHECK; // if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { // myAction = PLAYER_ACTION_CALL; // } @@ -1594,9 +1594,9 @@ void LocalPlayer::flopEngine() { // if(mySet >= 40) { // myAction = PLAYER_ACTION_CALL; // } - if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { - myAction = PLAYER_ACTION_CALL; - } +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_CALL; +// } } break; case 2: { @@ -1616,8 +1616,8 @@ void LocalPlayer::flopEngine() { case 3: { switch(actualHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_BET; - bet = 80; +// myAction = PLAYER_ACTION_BET; +// bet = 80; // if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { // myAction = PLAYER_ACTION_CALL; // } @@ -1643,9 +1643,34 @@ void LocalPlayer::flopEngine() { case 1: { myAction = PLAYER_ACTION_CHECK; // bet = 80; - if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { - myAction = PLAYER_ACTION_FOLD; - } +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_FOLD; +// } + } + break; + case 2: { +// myAction = PLAYER_ACTION_RAISE; +// raise = 50; +// if(mySet >= 70) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + default: { + } + } + + + } + break; + case 5: { + switch(actualHand->getMyID()) { + case 1: { + myAction = PLAYER_ACTION_CHECK; +// bet = 80; +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_FOLD; +// } } break; case 2: { @@ -2194,7 +2219,7 @@ void LocalPlayer::turnEngine() { switch(actualHand->getMyID()) { case 1: { -// myAction = PLAYER_ACTION_CALL; + myAction = PLAYER_ACTION_FOLD; // if(actualHand->getCurrentBeRo()->getHighestSet() > 100) { // myAction = PLAYER_ACTION_FOLD; // } @@ -2216,7 +2241,7 @@ void LocalPlayer::turnEngine() { case 1: { myAction = PLAYER_ACTION_BET; // raise = 40; - bet = 120; + bet = 40; // if(actualHand->getCurrentBeRo()->getHighestSet() > 100) { // myAction = PLAYER_ACTION_CALL; // } @@ -2239,7 +2264,57 @@ void LocalPlayer::turnEngine() { case 3: { switch(actualHand->getMyID()) { case 1: { - myAction = PLAYER_ACTION_FOLD; +// myAction = PLAYER_ACTION_FOLD; +// bet = 10; +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + case 2: { +// myAction = PLAYER_ACTION_RAISE; +// raise = 50; +// if(mySet >= 70) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + default: { + } + } + + + } + break; + case 4: { + switch(actualHand->getMyID()) { + case 1: { + myAction = PLAYER_ACTION_CALL; +// bet = 10; +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + case 2: { +// myAction = PLAYER_ACTION_RAISE; +// raise = 50; +// if(mySet >= 70) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + default: { + } + } + + + } + break; + case 5: { + switch(actualHand->getMyID()) { + case 1: { + myAction = PLAYER_ACTION_CALL; // bet = 10; // if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { // myAction = PLAYER_ACTION_CALL; @@ -2548,11 +2623,12 @@ void LocalPlayer::riverEngine() { switch(actualHand->getMyID()) { case 1: { -// myAction = PLAYER_ACTION_CALL; + myAction = PLAYER_ACTION_BET; + bet = 100; // raise = 40; -// if(actualHand->getCurrentBeRo()->getHighestSet() > 100) { -// myAction = PLAYER_ACTION_CALL; -// } + if(actualHand->getCurrentBeRo()->getHighestSet() > 100) { + myAction = PLAYER_ACTION_CALL; + } } break; case 2: { @@ -2593,6 +2669,59 @@ void LocalPlayer::riverEngine() { } + } + break; + case 4: { + switch(actualHand->getMyID()) { + case 1: { + myAction = PLAYER_ACTION_RAISE; + raise = 300; +// bet = 120; +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_RAISE; +// raise = 10000; +// } + } + break; + case 2: { +// myAction = PLAYER_ACTION_RAISE; +// raise = 50; +// if(mySet >= 70) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + default: { + } + } + + + } + break; + case 5: { + switch(actualHand->getMyID()) { + case 1: { + myAction = PLAYER_ACTION_FOLD; +// bet = 120; +// if(actualHand->getCurrentBeRo()->getHighestSet() > 0) { +// myAction = PLAYER_ACTION_RAISE; +// raise = 10000; +// } + } + break; + case 2: { +// myAction = PLAYER_ACTION_RAISE; +// raise = 50; +// if(mySet >= 70) { +// myAction = PLAYER_ACTION_CALL; +// } + } + break; + default: { + } + } + + } break; default: {} diff --git a/src/game.cpp b/src/game.cpp index 1429fefc..7d4880ad 100755 --- a/src/game.cpp +++ b/src/game.cpp @@ -37,7 +37,7 @@ Game::Game(GuiInterface* gui, boost::shared_ptr factory, myGameID(gameId), actualSmallBlind(gameData.smallBlind), actualHandID(0), dealerPosition(0), lastHandBlindsRaised(1), lastTimeBlindsRaised(0), myGameData(gameData) { if(DEBUG_MODE) { - startSmallBlind = 20; + startSmallBlind = 10; actualSmallBlind = startSmallBlind; } diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index 1b921e51..c8096907 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -813,7 +813,7 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) { startData.numberOfPlayers = gameData.maxNumberOfPlayers; Tools::getRandNumber(0, startData.numberOfPlayers-1, 1, &tmpDealerPos, 0); if(DEBUG_MODE) { - tmpDealerPos = 3; + tmpDealerPos = 1; } startData.startDealerPlayerId = static_cast(tmpDealerPos); @@ -2566,10 +2566,10 @@ void mainWindowImpl::postRiverRunAnimation2() { int j; - for (it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) { + for (it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) { (*it_c)->getMyCards(tempCardsIntArray); if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) { - if((*it_c)->getMyAction() || ((*it_c)->getMyAction()==0 && myConfig->readConfigInt("AntiPeekMode")) ) { + if((*it_c)->getMyID() || ((*it_c)->getMyID()==0 && myConfig->readConfigInt("AntiPeekMode")) ) { for(j=0; j<2; j++) { holeCardsArray[(*it_c)->getMyID()][j]->startFlipCards(guiGameSpeed, QPixmap(myAppDataPath +"gfx/cards/default/"+QString::number(tempCardsIntArray[j], 10)+".png"), flipside);