Merge remote-tracking branch 'origin/master'
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;
|
||||
|
||||
@@ -1990,7 +1990,7 @@ void gameTableImpl::myFold()
|
||||
|
||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_FOLD);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_FOLD,true);
|
||||
humanPlayer->setMyTurn(0);
|
||||
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
@@ -2009,7 +2009,7 @@ void gameTableImpl::myCheck()
|
||||
boost::shared_ptr<HandInterface> currentHand = myStartWindow->getSession()->getCurrentGame()->getCurrentHand();
|
||||
boost::shared_ptr<PlayerInterface> humanPlayer = currentHand->getSeatsList()->front();
|
||||
humanPlayer->setMyTurn(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CHECK);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CHECK,true);
|
||||
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
currentHand->setPreviousPlayerID(0);
|
||||
@@ -2072,10 +2072,10 @@ void gameTableImpl::myCall()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
} else {
|
||||
humanPlayer->setMySet(tempHighestSet - humanPlayer->getMySet());
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CALL);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_CALL,true);
|
||||
}
|
||||
humanPlayer->setMyTurn(0);
|
||||
|
||||
@@ -2108,7 +2108,7 @@ void gameTableImpl::mySet()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
|
||||
// full bet rule
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
|
||||
@@ -2119,7 +2119,7 @@ void gameTableImpl::mySet()
|
||||
if(myActionIsRaise) {
|
||||
//do not if allIn
|
||||
if(humanPlayer->getMyAction() != 6) {
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_RAISE);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_RAISE,true);
|
||||
}
|
||||
myActionIsRaise = 0;
|
||||
|
||||
@@ -2129,7 +2129,7 @@ void gameTableImpl::mySet()
|
||||
if(myActionIsBet) {
|
||||
//do not if allIn
|
||||
if(humanPlayer->getMyAction() != 6) {
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_BET);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_BET,true);
|
||||
}
|
||||
myActionIsBet = 0;
|
||||
|
||||
@@ -2166,7 +2166,7 @@ void gameTableImpl::myAllIn()
|
||||
|
||||
humanPlayer->setMySet(humanPlayer->getMyCash());
|
||||
humanPlayer->setMyCash(0);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN);
|
||||
humanPlayer->setMyAction(PLAYER_ACTION_ALLIN,true);
|
||||
|
||||
// full bet rule
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() + currentHand->getCurrentBeRo()->getMinimumRaise() > humanPlayer->getMySet()) {
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "configfile.h"
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtGui>
|
||||
|
||||
Reference in New Issue
Block a user