log side pot in network & handRanking-redraw
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 136 KiB |
@@ -53,8 +53,8 @@ public:
|
||||
|
||||
virtual void distributePot() =0;
|
||||
|
||||
virtual std::list<int> getWinners() const =0;
|
||||
virtual void setWinners(const std::list<int> &winners) =0;
|
||||
virtual std::list<unsigned> getWinners() const =0;
|
||||
virtual void setWinners(const std::list<unsigned> &winners) =0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ public:
|
||||
|
||||
void distributePot();
|
||||
|
||||
std::list<int> getWinners() const { return winners; }
|
||||
void setWinners(const std::list<int> &w) { winners = w; }
|
||||
std::list<unsigned> getWinners() const { return winners; }
|
||||
void setWinners(const std::list<unsigned> &w) { winners = w; }
|
||||
|
||||
|
||||
private:
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
|
||||
HandInterface *currentHand;
|
||||
|
||||
std::list<int> winners;
|
||||
std::list<unsigned> winners;
|
||||
|
||||
int myCards[5];
|
||||
int pot;
|
||||
|
||||
@@ -118,7 +118,7 @@ ClientBoard::distributePot()
|
||||
|
||||
}
|
||||
|
||||
std::list<int>
|
||||
std::list<unsigned>
|
||||
ClientBoard::getWinners() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
@@ -126,7 +126,7 @@ ClientBoard::getWinners() const
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::setWinners(const std::list<int> &w)
|
||||
ClientBoard::setWinners(const std::list<unsigned> &w)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
winners = w;
|
||||
|
||||
@@ -50,8 +50,8 @@ public:
|
||||
|
||||
void distributePot();
|
||||
|
||||
std::list<int> getWinners() const;
|
||||
void setWinners(const std::list<int> &winners);
|
||||
std::list<unsigned> getWinners() const;
|
||||
void setWinners(const std::list<unsigned> &winners);
|
||||
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
|
||||
HandInterface *currentHand;
|
||||
|
||||
std::list<int> winners;
|
||||
std::list<unsigned> winners;
|
||||
|
||||
int myCards[5];
|
||||
int pot;
|
||||
|
||||
@@ -2582,7 +2582,7 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
||||
}
|
||||
|
||||
|
||||
list<int> winners = currentHand->getBoard()->getWinners();
|
||||
list<unsigned> winners = currentHand->getBoard()->getWinners();
|
||||
|
||||
|
||||
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
@@ -2645,8 +2645,7 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
||||
}
|
||||
//Pot-Verteilung Loggen
|
||||
//Pro Spieler den Cash aus dem Player und dem Label auslesen. Player_cash - Label_cash = Gewinnsumme
|
||||
bool toIntBool = TRUE;
|
||||
int pot = (*it_c)->getMyCash() - cashLabelArray[(*it_c)->getMyID()]->text().remove(" $").toInt(&toIntBool,10) ;
|
||||
int pot = (*it_c)->getLastMoneyWon();
|
||||
//Wenn River dann auch das Blatt loggen!
|
||||
// if (textLabel_handLabel->text() == "River") {
|
||||
|
||||
@@ -2670,14 +2669,13 @@ void mainWindowImpl::postRiverRunAnimation3() {
|
||||
}
|
||||
|
||||
// log side pot winners -> TODO
|
||||
list<int>::iterator it_int;
|
||||
list<unsigned>::iterator it_int;
|
||||
for(it_c=currentHand->getActivePlayerList()->begin(); it_c!=currentHand->getActivePlayerList()->end(); it_c++) {
|
||||
if((*it_c)->getMyAction() != PLAYER_ACTION_FOLD && (*it_c)->getMyCardsValueInt() != currentHand->getCurrentBeRo()->getHighestCardsValue() ) {
|
||||
|
||||
for(it_int = winners.begin(); it_int != winners.end(); it_int++) {
|
||||
if((*it_int) == (*it_c)->getMyID()) {
|
||||
bool toIntBool = TRUE;
|
||||
int pot = (*it_c)->getMyCash() - cashLabelArray[(*it_c)->getMyID()]->text().remove(" $").toInt(&toIntBool,10);
|
||||
if((*it_int) == (*it_c)->getMyUniqueID()) {
|
||||
int pot = (*it_c)->getLastMoneyWon();
|
||||
(*it_c)->setMyWinnerState(false, pot);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1106,7 +1106,7 @@ ClientStateRunHand::InternalProcess(ClientThread &client, boost::shared_ptr<NetP
|
||||
|
||||
tmpPlayer->setMyCash(endHandData.playerMoney);
|
||||
tmpPlayer->setLastMoneyWon(endHandData.moneyWon);
|
||||
list<int> winnerList;
|
||||
list<unsigned> winnerList;
|
||||
winnerList.push_back(tmpPlayer->getMyUniqueID());
|
||||
|
||||
curGame->getCurrentHand()->getBoard()->setPot(0);
|
||||
@@ -1137,7 +1137,7 @@ ClientStateRunHand::InternalProcess(ClientThread &client, boost::shared_ptr<NetP
|
||||
NetPacketEndOfHandShowCards::PlayerResultList::const_iterator end
|
||||
= endHandData.playerResults.end();
|
||||
|
||||
list<int> winnerList;
|
||||
list<unsigned> winnerList;
|
||||
int highestValueOfCards = 0;
|
||||
while (i != end)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user