log side pot in network & handRanking-redraw

This commit is contained in:
floty
2007-11-11 23:47:38 +00:00
parent f1f45c9b0b
commit 9dd683fb59
7 changed files with 17 additions and 19 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 136 KiB

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