diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index 2096ef2e..16d9daa7 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -106,11 +106,11 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI case 1: { - tempBoardArray[0] = 12; - tempBoardArray[1] = 11; - tempBoardArray[2] = 9; - tempBoardArray[3] = 17; - tempBoardArray[4] = 14; + tempBoardArray[0] = 3; + tempBoardArray[1] = 16; + tempBoardArray[2] = 29; + tempBoardArray[3] = 0; + tempBoardArray[4] = 6; myBoard->setMyCards(tempBoardArray); @@ -122,8 +122,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player0 - tempPlayerArray[0] = 34; - tempPlayerArray[1] = 33; + tempPlayerArray[0] = 12; + tempPlayerArray[1] = 15; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -134,8 +134,8 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI // player1 - tempPlayerArray[0] = 47; - tempPlayerArray[1] = 45; + tempPlayerArray[0] = 10; + tempPlayerArray[1] = 28; tempPlayerAndBoardArray[0] = tempPlayerArray[0]; tempPlayerAndBoardArray[1] = tempPlayerArray[1]; @@ -144,29 +144,29 @@ LocalHand::LocalHand(boost::shared_ptr f, GuiInterface *g, BoardI playerArray[1]->setMyBestHandPosition(temp5Array); -// // player2 -// -// tempPlayerArray[0] = 7; -// tempPlayerArray[1] = 17; -// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; -// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; -// -// playerArray[2]->setMyCards(tempPlayerArray); -// playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); -// -// playerArray[2]->setMyBestHandPosition(temp5Array); -// -// // player3 -// -// tempPlayerArray[0] = 26; -// tempPlayerArray[1] = 28; -// tempPlayerAndBoardArray[0] = tempPlayerArray[0]; -// tempPlayerAndBoardArray[1] = tempPlayerArray[1]; -// -// playerArray[3]->setMyCards(tempPlayerArray); -// playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); -// -// playerArray[3]->setMyBestHandPosition(temp5Array); + // player2 + + tempPlayerArray[0] = 25; + tempPlayerArray[1] = 36; + tempPlayerAndBoardArray[0] = tempPlayerArray[0]; + tempPlayerAndBoardArray[1] = tempPlayerArray[1]; + + playerArray[2]->setMyCards(tempPlayerArray); + playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); + + playerArray[2]->setMyBestHandPosition(temp5Array); + + // player3 + + tempPlayerArray[0] = 51; + tempPlayerArray[1] = 34; + tempPlayerAndBoardArray[0] = tempPlayerArray[0]; + tempPlayerAndBoardArray[1] = tempPlayerArray[1]; + + playerArray[3]->setMyCards(tempPlayerArray); + playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array)); + + playerArray[3]->setMyBestHandPosition(temp5Array); } break; case 2: { diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index 7069556b..ef5457cc 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -357,7 +357,7 @@ void LocalPlayer::preflopEngine() { switch(actualHand->getMyID()) { case 1: { -// myAction = PLAYER_ACTION_CALL; + myAction = PLAYER_ACTION_CALL; } break; case 2: { diff --git a/src/gui/qt/mainwindow/log/log.cpp b/src/gui/qt/mainwindow/log/log.cpp index 0fe8f748..a8e05e87 100644 --- a/src/gui/qt/mainwindow/log/log.cpp +++ b/src/gui/qt/mainwindow/log/log.cpp @@ -1294,16 +1294,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10000) == (myCardsValueInt/10000)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1333,16 +1330,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10000) == (myCardsValueInt/10000)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1353,16 +1347,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // second kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/100) == (myCardsValueInt/100)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1373,16 +1364,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // third kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10) == (myCardsValueInt/10)) { equal = true; + it++; } else { different = true; sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } } } if(different) { @@ -1393,16 +1381,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // third kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if((*it) == myCardsValueInt) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1433,16 +1418,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10000) == (myCardsValueInt/10000)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1453,16 +1435,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // second kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/100) == (myCardsValueInt/100)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1487,16 +1466,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/100) == (myCardsValueInt/100)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1521,16 +1497,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10000) == (myCardsValueInt/10000)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1541,16 +1514,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // second kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/100) == (myCardsValueInt/100)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1561,16 +1531,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // third kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if((*it) == myCardsValueInt) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1596,16 +1563,13 @@ QString Log::determineHandName(int myCardsValueInt) { // 1.same hands existing if(!(sameHandCardsValueInt.empty())) { // first kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10000) == (myCardsValueInt/10000)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1616,16 +1580,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // second kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/100) == (myCardsValueInt/100)) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) { @@ -1636,16 +1597,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // third kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if(((*it)/10) == (myCardsValueInt/10)) { equal = true; + it++; } else { different = true; sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } } } if(different) { @@ -1656,16 +1614,13 @@ QString Log::determineHandName(int myCardsValueInt) { different = false; equal = false; // third kicker? - for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); it++) { + for(it = sameHandCardsValueInt.begin(); it != sameHandCardsValueInt.end(); ) { if((*it) == myCardsValueInt) { equal = true; + it++; } else { different = true; - sameHandCardsValueInt.erase(it); - // last list element ? - if(sameHandCardsValueInt.empty()) { - break; - } + it = sameHandCardsValueInt.erase(it); } } if(different) {