adapt log of local game to log of network/internet game
This commit is contained in:
@@ -490,7 +490,7 @@ void LocalHand::setBlinds()
|
||||
|
||||
(*it_c)->setMySet((*it_c)->getMyCash());
|
||||
// 1 to do not log this
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
|
||||
} else {
|
||||
(*it_c)->setMySet(smallBlind);
|
||||
@@ -510,7 +510,7 @@ void LocalHand::setBlinds()
|
||||
|
||||
(*it_c)->setMySet((*it_c)->getMyCash());
|
||||
// 1 to do not log this
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN,1);
|
||||
(*it_c)->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
|
||||
} else {
|
||||
(*it_c)->setMySet(2*smallBlind);
|
||||
@@ -526,7 +526,7 @@ void LocalHand::switchRounds()
|
||||
// logging last player action
|
||||
PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID);
|
||||
if(previousPlayerIt != runningPlayerList->end()) {
|
||||
if(myLog) myLog->logPlayerAction((*previousPlayerIt)->getMyName(),myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMySet());
|
||||
if(myLog) myLog->logPlayerAction((*previousPlayerIt)->getMyName(),myLog->transformPlayerActionLog((*previousPlayerIt)->getMyAction()),(*previousPlayerIt)->getMyLastRelativeSet());
|
||||
}
|
||||
|
||||
PlayerListIterator it, it_1;
|
||||
|
||||
@@ -1068,7 +1068,7 @@ void LocalPlayer::action()
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
currentHand->setPreviousPlayerID(myID);
|
||||
|
||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, myLastRelativeSet);
|
||||
currentHand->getGuiInterface()->nextPlayerAnimation();
|
||||
|
||||
// cout << "playerID in action(): " << (*(currentHand->getCurrentBeRo()->getCurrentPlayersTurnIt()))->getMyID() << endl;
|
||||
@@ -3230,14 +3230,12 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
case 3: {
|
||||
// all in
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - highestSet + mySet;
|
||||
mySet = highestSet;
|
||||
setMySet(highestSet-mySet);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -3250,16 +3248,14 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
currentHand->getCurrentBeRo()->setFullBetRule(true);
|
||||
}
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(myCash);
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(bet);
|
||||
myCash = myCash - bet;
|
||||
mySet = bet;
|
||||
setMySet(bet);
|
||||
highestSet = mySet;
|
||||
|
||||
}
|
||||
@@ -3272,14 +3268,12 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
if(currentHand->getCurrentBeRo()->getFullBetRule()) { // full bet rule -> only call possible
|
||||
// all in
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - highestSet + mySet;
|
||||
mySet = highestSet;
|
||||
setMySet(highestSet-mySet);
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
} else {
|
||||
@@ -3292,8 +3286,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// perhaps full bet rule
|
||||
if(highestSet >= myCash + mySet) {
|
||||
// only call all-in
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
setMySet(myCash);
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
} else {
|
||||
// raise, but not enough --> full bet rule
|
||||
@@ -3301,9 +3294,8 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
setMySet(myCash);
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
@@ -3311,9 +3303,8 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
setMySet(myCash);
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
@@ -3321,8 +3312,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// sonst
|
||||
else {
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(raise);
|
||||
myCash = myCash + mySet - highestSet - raise;
|
||||
mySet = highestSet + raise;
|
||||
setMySet(highestSet+raise-mySet);
|
||||
highestSet = mySet;
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
@@ -113,10 +113,10 @@ public:
|
||||
return myLastRelativeSet;
|
||||
}
|
||||
|
||||
void setMyAction(PlayerAction theValue, bool blind = 0) {
|
||||
void setMyAction(PlayerAction theValue, bool human = 0) {
|
||||
myAction = theValue;
|
||||
// logging for human player
|
||||
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
// logging for seat 0
|
||||
if(myAction && human) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, myLastRelativeSet);
|
||||
}
|
||||
PlayerAction getMyAction() const {
|
||||
return myAction;
|
||||
|
||||
@@ -195,7 +195,7 @@ ClientPlayer::getMyLastRelativeSet() const
|
||||
}
|
||||
|
||||
void
|
||||
ClientPlayer::setMyAction(PlayerAction theValue, bool /*blind*/)
|
||||
ClientPlayer::setMyAction(PlayerAction theValue, bool /*human*/)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
myAction = theValue;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
int getMySet() const;
|
||||
int getMyLastRelativeSet() const;
|
||||
|
||||
void setMyAction(PlayerAction theValue, bool blind);
|
||||
void setMyAction(PlayerAction theValue, bool human);
|
||||
PlayerAction getMyAction() const;
|
||||
|
||||
void setMyButton(int theValue);
|
||||
|
||||
@@ -62,8 +62,8 @@ public:
|
||||
virtual int getMySet() const =0;
|
||||
virtual int getMyLastRelativeSet() const =0;
|
||||
|
||||
virtual void setMyAction(PlayerAction theValue, bool blind=0) =0;
|
||||
virtual PlayerAction getMyAction() const =0;
|
||||
virtual void setMyAction(PlayerAction theValue, bool human=0) =0;
|
||||
virtual PlayerAction getMyAction() const =0;
|
||||
|
||||
virtual void setMyButton(int theValue) =0;
|
||||
virtual int getMyButton() const =0;
|
||||
|
||||
Reference in New Issue
Block a user