applying astyle
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
using namespace std;
|
||||
|
||||
LocalBeRo::LocalBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS)
|
||||
: BeRoInterface(), myHand(hi), myBeRoID(gS), dealerPosition(dP), smallBlindPosition(0), dealerPositionId(dP), smallBlindPositionId(0), bigBlindPositionId(0), smallBlind(sB), highestSet(0), minimumRaise(2*sB), fullBetRule(false), firstRun(true), firstRunGui(true), firstRound(true), firstHeadsUpRound(true), currentPlayersTurnId(0), firstRoundLastPlayersTurnId(0), logBoardCardsDone(false)
|
||||
: BeRoInterface(), myHand(hi), myBeRoID(gS), dealerPosition(dP), smallBlindPosition(0), dealerPositionId(dP), smallBlindPositionId(0), bigBlindPositionId(0), smallBlind(sB), highestSet(0), minimumRaise(2*sB), fullBetRule(false), firstRun(true), firstRunGui(true), firstRound(true), firstHeadsUpRound(true), currentPlayersTurnId(0), firstRoundLastPlayersTurnId(0), logBoardCardsDone(false)
|
||||
{
|
||||
currentPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||
lastPlayersTurnIt = myHand->getRunningPlayerList()->begin();
|
||||
@@ -84,7 +84,7 @@ void LocalBeRo::run()
|
||||
|
||||
if(firstRunGui) {
|
||||
firstRunGui = false;
|
||||
myHand->setPreviousPlayerID(-1);
|
||||
myHand->setPreviousPlayerID(-1);
|
||||
myHand->getGuiInterface()->dealBeRoCards(myBeRoID);
|
||||
} else {
|
||||
|
||||
@@ -176,7 +176,7 @@ void LocalBeRo::run()
|
||||
|
||||
// aktuelle bero nicht dran, weil alle Sets gleich sind
|
||||
//also gehe in naechste bero
|
||||
myHand->setCurrentRound(GameState(myBeRoID+1));
|
||||
myHand->setCurrentRound(GameState(myBeRoID+1));
|
||||
|
||||
//Action loeschen und ActionButtons refresh
|
||||
for(it_c=myHand->getRunningPlayerList()->begin(); it_c!=myHand->getRunningPlayerList()->end(); ++it_c) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
class LocalBeRo : public BeRoInterface
|
||||
{
|
||||
public:
|
||||
LocalBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS);
|
||||
LocalBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS);
|
||||
~LocalBeRo();
|
||||
|
||||
GameState getMyBeRoID() const {
|
||||
|
||||
@@ -28,7 +28,7 @@ class LocalBeRoFlop : public LocalBeRo
|
||||
{
|
||||
|
||||
public:
|
||||
LocalBeRoFlop(HandInterface*, unsigned, int);
|
||||
LocalBeRoFlop(HandInterface*, unsigned, int);
|
||||
~LocalBeRoFlop();
|
||||
|
||||
};
|
||||
|
||||
@@ -83,28 +83,28 @@ void LocalBeRoPostRiver::postRiverRun()
|
||||
//Pot auf 0 setzen
|
||||
getMyHand()->getBoard()->setPot(0);
|
||||
|
||||
// logging hole Cards / Hands
|
||||
int nonfoldPlayersCounter = 0;
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
||||
}
|
||||
if(nonfoldPlayersCounter>1) {
|
||||
getMyHand()->getLog()->logHoleCardsHandName(5,getMyHand()->getActivePlayerList());
|
||||
}
|
||||
// logging hole Cards / Hands
|
||||
int nonfoldPlayersCounter = 0;
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyAction() != PLAYER_ACTION_FOLD) nonfoldPlayersCounter++;
|
||||
}
|
||||
if(nonfoldPlayersCounter>1) {
|
||||
getMyHand()->getLog()->logHoleCardsHandName(5,getMyHand()->getActivePlayerList());
|
||||
}
|
||||
|
||||
// logging winner if game is over
|
||||
// wenn nur noch ein Spieler aktive "neues Spiel"-Dialog anzeigen
|
||||
int playersPositiveCashCounter = 0;
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyCash() > 0) playersPositiveCashCounter++;
|
||||
}
|
||||
if (playersPositiveCashCounter==1) {
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyCash() > 0) {
|
||||
getMyHand()->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN_GAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
// logging winner if game is over
|
||||
// wenn nur noch ein Spieler aktive "neues Spiel"-Dialog anzeigen
|
||||
int playersPositiveCashCounter = 0;
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyCash() > 0) playersPositiveCashCounter++;
|
||||
}
|
||||
if (playersPositiveCashCounter==1) {
|
||||
for (it_c=getMyHand()->getActivePlayerList()->begin(); it_c!=getMyHand()->getActivePlayerList()->end(); ++it_c) {
|
||||
if ((*it_c)->getMyCash() > 0) {
|
||||
getMyHand()->getLog()->logPlayerAction(5,(*it_c)->getMyID()+1,LOG_ACTION_WIN_GAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//starte die Animaionsreihe
|
||||
getMyHand()->getGuiInterface()->postRiverRunAnimation1();
|
||||
|
||||
@@ -28,7 +28,7 @@ class HandInterface;
|
||||
class LocalBeRoPostRiver : public LocalBeRo
|
||||
{
|
||||
public:
|
||||
LocalBeRoPostRiver(HandInterface*, int, int);
|
||||
LocalBeRoPostRiver(HandInterface*, int, int);
|
||||
~LocalBeRoPostRiver();
|
||||
|
||||
void setHighestCardsValue(int theValue) {
|
||||
|
||||
@@ -28,7 +28,7 @@ class LocalBeRoPreflop : public LocalBeRo
|
||||
{
|
||||
|
||||
public:
|
||||
LocalBeRoPreflop(HandInterface*, unsigned, int);
|
||||
LocalBeRoPreflop(HandInterface*, unsigned, int);
|
||||
~LocalBeRoPreflop();
|
||||
|
||||
void run();
|
||||
|
||||
@@ -28,7 +28,7 @@ class HandInterface;
|
||||
class LocalBeRoRiver : public LocalBeRo
|
||||
{
|
||||
public:
|
||||
LocalBeRoRiver(HandInterface*, unsigned, int);
|
||||
LocalBeRoRiver(HandInterface*, unsigned, int);
|
||||
~LocalBeRoRiver();
|
||||
};
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class HandInterface;
|
||||
class LocalBeRoTurn : public LocalBeRo
|
||||
{
|
||||
public:
|
||||
LocalBeRoTurn(HandInterface*, unsigned, int);
|
||||
LocalBeRoTurn(HandInterface*, unsigned, int);
|
||||
~LocalBeRoTurn();
|
||||
|
||||
};
|
||||
|
||||
@@ -299,7 +299,7 @@ void LocalBoard::determinePlayerNeedToShowCards()
|
||||
// cout << "lAP-Ende: " << currentHand->getLastActionPlayer() << endl;
|
||||
// search lastActionPlayer
|
||||
for(it_c = activePlayerList->begin(); it_c != activePlayerList->end(); ++it_c) {
|
||||
if((*it_c)->getMyUniqueID() == lastActionPlayerID && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
if((*it_c)->getMyUniqueID() == lastActionPlayerID && (*it_c)->getMyAction() != PLAYER_ACTION_FOLD) {
|
||||
lastActionPlayerIt = it_c;
|
||||
// cout << (*it_c)->getMyUniqueID() << endl;
|
||||
break;
|
||||
|
||||
@@ -49,8 +49,8 @@ public:
|
||||
void setAllInCondition(bool theValue) {
|
||||
allInCondition = theValue;
|
||||
}
|
||||
void setLastActionPlayerID(unsigned theValue) {
|
||||
lastActionPlayerID = theValue;
|
||||
void setLastActionPlayerID(unsigned theValue) {
|
||||
lastActionPlayerID = theValue;
|
||||
}
|
||||
|
||||
int getPot() const {
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
int sets;
|
||||
unsigned dealerPosition;
|
||||
bool allInCondition;
|
||||
unsigned lastActionPlayerID;
|
||||
unsigned lastActionPlayerID;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -64,15 +64,15 @@ LocalEngineFactory::createBeRo(HandInterface *hi, unsigned dP, int sB)
|
||||
{
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPreflop(hi, dP, sB)));
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPreflop(hi, dP, sB)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoFlop(hi, dP, sB)));
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoFlop(hi, dP, sB)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoTurn(hi, dP, sB)));
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoTurn(hi, dP, sB)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoRiver(hi, dP, sB)));
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoRiver(hi, dP, sB)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPostRiver(hi, dP, sB)));
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new LocalBeRoPostRiver(hi, dP, sB)));
|
||||
|
||||
return myBeRo;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
virtual boost::shared_ptr<HandInterface> createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost::shared_ptr<BoardInterface> b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC);
|
||||
virtual boost::shared_ptr<BoardInterface> createBoard(unsigned dp);
|
||||
virtual boost::shared_ptr<PlayerInterface> createPlayer(int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB);
|
||||
virtual std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface *hi, unsigned dP, int sB);
|
||||
virtual std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface *hi, unsigned dP, int sB);
|
||||
|
||||
private:
|
||||
ConfigFile *myConfig;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
using namespace std;
|
||||
|
||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost::shared_ptr<BoardInterface> b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, unsigned dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), smallBlindPosition(dP), bigBlindPosition(dP), currentRound(GAME_STATE_PREFLOP), smallBlind(sB), startCash(sC), previousPlayerID(-1), lastActionPlayerID(0), allInCondition(false),
|
||||
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myBeRo(0), myID(id), startQuantityPlayers(sP), dealerPosition(dP), smallBlindPosition(dP), bigBlindPosition(dP), currentRound(GAME_STATE_PREFLOP), smallBlind(sB), startCash(sC), previousPlayerID(-1), lastActionPlayerID(0), allInCondition(false),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
|
||||
// generate cards and assign to board and player
|
||||
const int NumCards = 52;
|
||||
int cardsArray[NumCards] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
|
||||
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
||||
@@ -367,7 +367,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boost:
|
||||
|
||||
setBlinds();
|
||||
|
||||
myBeRo = myFactory->createBeRo(this, dealerPosition, smallBlind);
|
||||
myBeRo = myFactory->createBeRo(this, dealerPosition, smallBlind);
|
||||
}
|
||||
|
||||
|
||||
@@ -448,8 +448,8 @@ void LocalHand::assignButtons()
|
||||
}
|
||||
|
||||
// first player after dealer have to show his cards first (in showdown)
|
||||
lastActionPlayerID = (*it)->getMyUniqueID();
|
||||
myBoard->setLastActionPlayerID(lastActionPlayerID);
|
||||
lastActionPlayerID = (*it)->getMyUniqueID();
|
||||
myBoard->setLastActionPlayerID(lastActionPlayerID);
|
||||
|
||||
++it;
|
||||
if(it == activePlayerList->end()) it = activePlayerList->begin();
|
||||
@@ -528,29 +528,29 @@ void LocalHand::setBlinds()
|
||||
void LocalHand::switchRounds()
|
||||
{
|
||||
|
||||
// logging last player action
|
||||
// currentPlayersTurnIt = myHand->getRunningPlayerIt( currentPlayersTurnId );
|
||||
// if(currentPlayersTurnIt == myHand->getRunningPlayerList()->end()) {
|
||||
// throw LocalException(__FILE__, __LINE__, ERR_RUNNING_PLAYER_NOT_FOUND);
|
||||
// }
|
||||
// // logging last player action
|
||||
// PlayerListConstIterator previousPlayerIt = getRunningPlayerIt(previousPlayerID);
|
||||
// if(previousPlayerIt == runningPlayerList->end()) {
|
||||
// throw LocalException(__FILE__, __LINE__, ERR_RUNNING_PLAYER_NOT_FOUND);
|
||||
// }
|
||||
|
||||
|
||||
// switch((*currentPlayersTurnIt)->getMyAction()) {
|
||||
// switch((*previousPlayerIt)->getMyAction()) {
|
||||
// case PLAYER_ACTION_FOLD: {
|
||||
// myHand->getLog()->logPlayerAction(myBeRoID+1,(*currentPlayersTurnIt)->getMyID()+1,LOG_ACTION_FOLD);
|
||||
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_FOLD);
|
||||
// } break;
|
||||
// case PLAYER_ACTION_CHECK: {
|
||||
// myHand->getLog()->logPlayerAction(myBeRoID+1,(*currentPlayersTurnIt)->getMyID()+1,LOG_ACTION_CHECK);
|
||||
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CHECK);
|
||||
// } break;
|
||||
// case PLAYER_ACTION_CALL: {
|
||||
// myHand->getLog()->logPlayerAction(myBeRoID+1,(*currentPlayersTurnIt)->getMyID()+1,LOG_ACTION_CALL);
|
||||
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_CALL);
|
||||
// } break;
|
||||
// case PLAYER_ACTION_BET:
|
||||
// case PLAYER_ACTION_RAISE: {
|
||||
// myHand->getLog()->logPlayerAction(myBeRoID+1,(*currentPlayersTurnIt)->getMyID()+1,LOG_ACTION_BET,(*currentPlayersTurnIt)->getMySet());
|
||||
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_BET,(*previousPlayerIt)->getMySet());
|
||||
// } break;
|
||||
// case PLAYER_ACTION_ALLIN: {
|
||||
// myHand->getLog()->logPlayerAction(myBeRoID+1,(*currentPlayersTurnIt)->getMyID()+1,LOG_ACTION_ALL_IN,(*currentPlayersTurnIt)->getMySet());
|
||||
// myLog->logPlayerAction(currentRound+1,(*previousPlayerIt)->getMyID()+1,LOG_ACTION_ALL_IN,(*previousPlayerIt)->getMySet());
|
||||
// } break;
|
||||
// default: {
|
||||
// }
|
||||
@@ -595,7 +595,7 @@ void LocalHand::switchRounds()
|
||||
myBoard->collectPot();
|
||||
myGui->refreshPot();
|
||||
myGui->refreshSet();
|
||||
currentRound = GAME_STATE_POST_RIVER;
|
||||
currentRound = GAME_STATE_POST_RIVER;
|
||||
}
|
||||
|
||||
// check for all in condition
|
||||
@@ -655,16 +655,16 @@ void LocalHand::switchRounds()
|
||||
myGui->refreshPot();
|
||||
myGui->refreshSet();
|
||||
myGui->flipHolecardsAllIn();
|
||||
// Logging HoleCards
|
||||
if(currentRound<GAME_STATE_RIVER) {
|
||||
myLog->logHoleCardsHandName(currentRound+1,activePlayerList);
|
||||
}
|
||||
// Logging HoleCards
|
||||
if(currentRound<GAME_STATE_RIVER) {
|
||||
myLog->logHoleCardsHandName(currentRound+1,activePlayerList);
|
||||
}
|
||||
|
||||
if (currentRound < GAME_STATE_POST_RIVER) // do not increment past 4
|
||||
currentRound = GameState(currentRound + 1);
|
||||
if (currentRound < GAME_STATE_POST_RIVER) // do not increment past 4
|
||||
currentRound = GameState(currentRound + 1);
|
||||
|
||||
//log board cards for allin
|
||||
if(currentRound >= GAME_STATE_FLOP) {
|
||||
if(currentRound >= GAME_STATE_FLOP) {
|
||||
int tempBoardCardsArray[5];
|
||||
|
||||
myBoard->getMyCards(tempBoardCardsArray);
|
||||
@@ -675,10 +675,10 @@ void LocalHand::switchRounds()
|
||||
}
|
||||
|
||||
//unhighlight current players groupbox
|
||||
it_c = getActivePlayerIt(previousPlayerID);
|
||||
it_c = getActivePlayerIt(previousPlayerID);
|
||||
if( it_c != activePlayerList->end() ) {
|
||||
// lastPlayersTurn is active
|
||||
myGui->refreshGroupbox(previousPlayerID,1);
|
||||
myGui->refreshGroupbox(previousPlayerID,1);
|
||||
}
|
||||
|
||||
myGui->refreshGameLabels((GameState)getCurrentRound());
|
||||
@@ -769,6 +769,6 @@ PlayerListIterator LocalHand::getRunningPlayerIt(unsigned uniqueId) const
|
||||
|
||||
void LocalHand::setLastActionPlayerID(unsigned theValue)
|
||||
{
|
||||
lastActionPlayerID = theValue;
|
||||
myBoard->setLastActionPlayerID(theValue);
|
||||
lastActionPlayerID = theValue;
|
||||
myBoard->setLastActionPlayerID(theValue);
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ public:
|
||||
return startQuantityPlayers;
|
||||
}
|
||||
|
||||
void setCurrentRound(GameState theValue) {
|
||||
void setCurrentRound(GameState theValue) {
|
||||
currentRound = theValue;
|
||||
}
|
||||
GameState getCurrentRound() const {
|
||||
GameState getCurrentRound() const {
|
||||
return currentRound;
|
||||
}
|
||||
|
||||
@@ -130,16 +130,16 @@ public:
|
||||
return bettingRoundsPlayed;
|
||||
}
|
||||
|
||||
void setPreviousPlayerID(int theValue) {
|
||||
previousPlayerID = theValue;
|
||||
void setPreviousPlayerID(int theValue) {
|
||||
previousPlayerID = theValue;
|
||||
}
|
||||
int getPreviousPlayerID() const {
|
||||
return previousPlayerID;
|
||||
int getPreviousPlayerID() const {
|
||||
return previousPlayerID;
|
||||
}
|
||||
|
||||
void setLastActionPlayerID ( unsigned theValue );
|
||||
unsigned getLastActionPlayerID() const {
|
||||
return lastActionPlayerID;
|
||||
void setLastActionPlayerID ( unsigned theValue );
|
||||
unsigned getLastActionPlayerID() const {
|
||||
return lastActionPlayerID;
|
||||
}
|
||||
|
||||
void setCardsShown(bool theValue) {
|
||||
@@ -177,12 +177,12 @@ private:
|
||||
unsigned dealerPosition;
|
||||
unsigned smallBlindPosition;
|
||||
unsigned bigBlindPosition;
|
||||
GameState currentRound;
|
||||
GameState currentRound;
|
||||
int smallBlind;
|
||||
int startCash;
|
||||
|
||||
int previousPlayerID;
|
||||
unsigned lastActionPlayerID;
|
||||
int previousPlayerID;
|
||||
unsigned lastActionPlayerID;
|
||||
|
||||
bool allInCondition;
|
||||
bool cardsShown;
|
||||
|
||||
@@ -847,7 +847,7 @@ static const RoundData FlopValues[] = {
|
||||
|
||||
LocalPlayer::LocalPlayer(ConfigFile *c, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB)
|
||||
: PlayerInterface(), myConfig(c), currentHand(0), myID(id), myUniqueID(uniqueId), myType(type), myName(name), myAvatar(avatar),
|
||||
myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(PLAYER_ACTION_NONE),
|
||||
myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myLastRelativeSet(0), myAction(PLAYER_ACTION_NONE),
|
||||
myButton(mB), myActiveStatus(aS), myStayOnTableStatus(1), myTurn(0), myCardsFlip(0), myRoundStartCash(0), lastMoneyWon(0),
|
||||
sBluff(0), sBluffStatus(0), myWinnerState(false), m_actionTimeoutCounter(0), m_isConnected(false)
|
||||
{
|
||||
@@ -1066,7 +1066,7 @@ void LocalPlayer::action()
|
||||
// cout << "jetzt" << endl;
|
||||
|
||||
//set that i was the last active player. need this for unhighlighting groupbox
|
||||
currentHand->setPreviousPlayerID(myID);
|
||||
currentHand->setPreviousPlayerID(myID);
|
||||
|
||||
currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
currentHand->getGuiInterface()->nextPlayerAnimation();
|
||||
@@ -1222,16 +1222,16 @@ void LocalPlayer::preflopEngine()
|
||||
// all in
|
||||
if(myOdds >= myNiveau[2] + 8) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
// nur call
|
||||
else {
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/5) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1247,51 +1247,51 @@ void LocalPlayer::preflopEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// auf cBluff testen --> call (bzw check) statt raise
|
||||
if(cBluff > 90) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 4) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 8) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 12) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
|
||||
} else {
|
||||
// call
|
||||
if(myOdds >= myNiveau[0] || (mySet >= currentHand->getCurrentBeRo()->getHighestSet()/2 && myOdds >= myNiveau[0]-8)) {
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
else {
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/5) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
// fold
|
||||
else {
|
||||
// bigBlind -> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
else myAction = PLAYER_ACTION_FOLD;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
else myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1308,11 +1308,11 @@ void LocalPlayer::preflopEngine()
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/6) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// bigBlind --> check
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
if(myButton == 3 && mySet == currentHand->getCurrentBeRo()->getHighestSet()) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
}
|
||||
// Standard-Raise-Routine
|
||||
@@ -1327,12 +1327,12 @@ void LocalPlayer::preflopEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// extrem hoher set der gegner -> bluff beenden
|
||||
if((currentHand->getCurrentBeRo()->getHighestSet() >= 12*currentHand->getSmallBlind() && myOdds < myNiveau[0]) || (currentHand->getCurrentBeRo()->getHighestSet() >= 20*currentHand->getSmallBlind() && myOdds < myNiveau[2])) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
|
||||
|
||||
@@ -1590,16 +1590,16 @@ void LocalPlayer::flopEngine()
|
||||
// all in
|
||||
if(myOdds >= myNiveau[2] + 15) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
// nur call
|
||||
else {
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/5) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1615,14 +1615,14 @@ void LocalPlayer::flopEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4.0)/5.0) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// auf cBluff testen --> call statt raise
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 4) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 8) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 12) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 4) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 8) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 12) myAction = PLAYER_ACTION_CALL;
|
||||
|
||||
} else {
|
||||
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
|
||||
@@ -1630,12 +1630,12 @@ void LocalPlayer::flopEngine()
|
||||
// all in bei knappem call
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() > (myCash*3.0)/4.0) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// fold
|
||||
else {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1654,17 +1654,17 @@ void LocalPlayer::flopEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
|
||||
// auf cBluff testen --> check statt bet
|
||||
if(cBluff > 80) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[1] + 4) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[1] + 8) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 50 && myOdds >= myNiveau[1] + 12) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 80) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[1] + 4) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[1] + 8) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 50 && myOdds >= myNiveau[1] + 12) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// check
|
||||
else {
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
// Position
|
||||
if(myButton == 1) {
|
||||
// Position-Bluff generieren
|
||||
@@ -1683,7 +1683,7 @@ void LocalPlayer::flopEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1701,7 +1701,7 @@ void LocalPlayer::flopEngine()
|
||||
|
||||
// Gegner setzen -> call
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 4*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// Standard-Raise-Routine
|
||||
else {
|
||||
@@ -1716,12 +1716,12 @@ void LocalPlayer::flopEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// extrem hoher set der gegner -> bluff beenden
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 10*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1743,7 +1743,7 @@ void LocalPlayer::flopEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1974,11 +1974,11 @@ void LocalPlayer::flopEngine()
|
||||
// case 4: {
|
||||
// Tools::getRandNumber(0,100,1,&cBluff,0);
|
||||
// if(cBluff < 35) {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// else {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 8) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// if(cBluff < 60) {
|
||||
// bet = (7-myDude4)*2*currentHand->getSmallBlind();
|
||||
@@ -1986,7 +1986,7 @@ void LocalPlayer::flopEngine()
|
||||
// bet = (((100-cBluff)/20)+2)*currentHand->getSmallBlind();
|
||||
// }
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -1996,11 +1996,11 @@ void LocalPlayer::flopEngine()
|
||||
// case 2: {
|
||||
// Tools::getRandNumber(0,100,1,&cBluff,0);
|
||||
// if(cBluff < 35) {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// else {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 8) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// if(cBluff < 60) {
|
||||
// bet = (5-myDude4)*2*currentHand->getSmallBlind();
|
||||
@@ -2008,7 +2008,7 @@ void LocalPlayer::flopEngine()
|
||||
// bet = (((100-cBluff)/20)+2)*currentHand->getSmallBlind();
|
||||
// }
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -2016,11 +2016,11 @@ void LocalPlayer::flopEngine()
|
||||
// case 1: {
|
||||
// Tools::getRandNumber(0,100,1,&cBluff,0);
|
||||
// if(cBluff < 40) {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// else {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 6) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// if(cBluff < 60) {
|
||||
// bet = (3-myDude4)*2*currentHand->getSmallBlind();
|
||||
@@ -2028,7 +2028,7 @@ void LocalPlayer::flopEngine()
|
||||
// bet = (((100-cBluff)/20)+2)*currentHand->getSmallBlind();
|
||||
// }
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -2038,10 +2038,10 @@ void LocalPlayer::flopEngine()
|
||||
// if(info[1] >= 10 && sBluff <= 40) {
|
||||
// bet = (sBluff/10)*2*currentHand->getSmallBlind();
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// else {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -2052,15 +2052,15 @@ void LocalPlayer::flopEngine()
|
||||
// case 2: {
|
||||
// Tools::getRandNumber(0,100,1,&cBluff,0);
|
||||
// if(cBluff > 80) {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// else {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 6) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// bet = (cBluff/20)*2*currentHand->getSmallBlind();
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -2068,15 +2068,15 @@ void LocalPlayer::flopEngine()
|
||||
// default: {
|
||||
// Tools::getRandNumber(0,100,1,&cBluff,0);
|
||||
// if(cBluff > 90) {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// else {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 5) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// bet = (cBluff/30)*2*currentHand->getSmallBlind();
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -2092,7 +2092,7 @@ void LocalPlayer::flopEngine()
|
||||
// if(currentHand->getActivePlayerList().size() == 2) {
|
||||
// bet = (1-myDude4)*2*currentHand->getSmallBlind();
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
//
|
||||
// }
|
||||
// else {
|
||||
@@ -2100,40 +2100,40 @@ void LocalPlayer::flopEngine()
|
||||
// case 3: {
|
||||
// if(sBluff <= 10) {
|
||||
// bet = (sBluff/5 + 2)*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// else {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case 2: {
|
||||
// if(sBluff <= 15) {
|
||||
// bet = (sBluff/5 + 2)*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// else {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// case 1: {
|
||||
// if(sBluff <= 50) {
|
||||
// bet = (sBluff/15 + 2)*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// else {
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// myAction = PLAYER_ACTION_CHECK;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
// default: {
|
||||
// if(myCash/(2*currentHand->getSmallBlind()) <= 5) {
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// myAction = PLAYER_ACTION_ALLIN;
|
||||
// } else {
|
||||
// bet = (sBluff/15)*2*currentHand->getSmallBlind();
|
||||
// if(bet < 2*currentHand->getSmallBlind()) bet = 2*currentHand->getSmallBlind();
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// myAction = PLAYER_ACTION_BET;
|
||||
// }
|
||||
// }
|
||||
// break;
|
||||
@@ -2292,16 +2292,16 @@ void LocalPlayer::turnEngine()
|
||||
// all in
|
||||
if(myOdds >= myNiveau[2] + 15) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
// nur call
|
||||
else {
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/5) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2317,25 +2317,25 @@ void LocalPlayer::turnEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4.0)/5.0) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
// auf cBluff testen --> call statt raise
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 5) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 10) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 15) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 5) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 10) myAction = PLAYER_ACTION_CALL;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 15) myAction = PLAYER_ACTION_CALL;
|
||||
} else {
|
||||
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
|
||||
if(myOdds >= myNiveau[0] || (mySet >= currentHand->getCurrentBeRo()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > individualHighestSet && myNiveau[0]-3)) {
|
||||
// all in bei knappem call
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() > (myCash*3.0)/4.0) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// fold
|
||||
else {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2355,17 +2355,17 @@ void LocalPlayer::turnEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
|
||||
// auf cBluff testen --> call statt raise
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 5) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 10) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 15) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 90) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 80 && myOdds >= myNiveau[2] + 5) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 70 && myOdds >= myNiveau[2] + 10) myAction = PLAYER_ACTION_CHECK;
|
||||
if(cBluff > 60 && myOdds >= myNiveau[2] + 15) myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// check
|
||||
else {
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
// Position
|
||||
if(myButton == 1) {
|
||||
// Position-Bluff generieren
|
||||
@@ -2384,7 +2384,7 @@ void LocalPlayer::turnEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2401,7 +2401,7 @@ void LocalPlayer::turnEngine()
|
||||
|
||||
// Gegner setzen -> call
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 4*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// Standard-Raise-Routine
|
||||
else {
|
||||
@@ -2416,12 +2416,12 @@ void LocalPlayer::turnEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// extrem hoher set der gegner -> bluff beenden
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 10*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2443,7 +2443,7 @@ void LocalPlayer::turnEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2813,16 +2813,16 @@ void LocalPlayer::riverEngine()
|
||||
// all in
|
||||
if(myOdds >= myNiveau[2] + 15) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
// nur call
|
||||
else {
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/5) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2838,7 +2838,7 @@ void LocalPlayer::riverEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 8) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
} else {
|
||||
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
|
||||
@@ -2846,12 +2846,12 @@ void LocalPlayer::riverEngine()
|
||||
// all in bei knappem call
|
||||
if(myCash-currentHand->getCurrentBeRo()->getHighestSet() <= (myCash*1)/4) {
|
||||
raise = myCash;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
} else myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// fold
|
||||
else {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2869,11 +2869,11 @@ void LocalPlayer::riverEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
// check
|
||||
else {
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
// Position
|
||||
if(myButton == 1) {
|
||||
// Position-Bluff generieren
|
||||
@@ -2892,7 +2892,7 @@ void LocalPlayer::riverEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2913,7 +2913,7 @@ void LocalPlayer::riverEngine()
|
||||
|
||||
// Gegner setzen -> call
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 4*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
// Standard-Raise-Routine
|
||||
else {
|
||||
@@ -2928,12 +2928,12 @@ void LocalPlayer::riverEngine()
|
||||
if(myCash/(2*currentHand->getSmallBlind()) <= 6 || raise >= (myCash*4)/5) {
|
||||
raise = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
|
||||
// extrem hoher set der gegner -> bluff beenden
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() >= 10*currentHand->getSmallBlind()) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -2955,7 +2955,7 @@ void LocalPlayer::riverEngine()
|
||||
if(bet > (myCash*4.0)/5.0) {
|
||||
bet = myCash;
|
||||
}
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3237,7 +3237,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_ALL_IN,mySet);
|
||||
// cout << "evaluation(call) - mySet: " << mySet << endl;
|
||||
}
|
||||
@@ -3260,7 +3260,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(myCash);
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_ALL_IN,mySet);
|
||||
}
|
||||
@@ -3274,7 +3274,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
|
||||
}
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
}
|
||||
break;
|
||||
// raise
|
||||
@@ -3284,14 +3284,14 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
if(highestSet >= myCash + mySet) {
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_ALL_IN,mySet);
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - highestSet + mySet;
|
||||
mySet = highestSet;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_CALL,mySet);
|
||||
}
|
||||
} else {
|
||||
@@ -3306,27 +3306,27 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
// only call all-in
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
} else {
|
||||
// raise, but not enough --> full bet rule
|
||||
currentHand->getCurrentBeRo()->setFullBetRule(true);
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
} else {
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
|
||||
mySet += myCash;
|
||||
currentHand->getCurrentBeRo()->setMinimumRaise(mySet-highestSet);
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
highestSet = mySet;
|
||||
}
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_ALL_IN,mySet);
|
||||
@@ -3338,7 +3338,7 @@ void LocalPlayer::evaluation(int bet, int raise)
|
||||
mySet = highestSet + raise;
|
||||
highestSet = mySet;
|
||||
// lastPlayerAction für Karten umblättern reihenfolge setzrn
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
currentHand->setLastActionPlayerID(myUniqueID);
|
||||
// currentHand->getLog()->logPlayerAction(currentHand->getCurrentRound()+1,myID+1,LOG_ACTION_BET,mySet);
|
||||
}
|
||||
}
|
||||
@@ -4470,7 +4470,7 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
// FOLD --> wenn Potential negativ oder HighestSet zu hoch
|
||||
if( (potential*setToHighest<0 || (setToHighest > tempFold * currentHand->getSmallBlind() && potential<1) || (setToHighest > 2 * tempFold * currentHand->getSmallBlind() && potential<2) || (setToHighest > 4 * tempFold * currentHand->getSmallBlind() && potential<3) || (setToHighest > 10 * tempFold * currentHand->getSmallBlind() && potential<4)) && CardsValue::holeCardsClass(myCards[0], myCards[1]) < 9 && bluff > 15) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
} else {
|
||||
// RAISE --> wenn hohes Potential
|
||||
if((potential >= 4 && 6 * currentHand->getSmallBlind() >= currentHand->getCurrentBeRo()->getHighestSet()) || bluff <= 6) {
|
||||
@@ -4489,14 +4489,14 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
} else {
|
||||
// doch nich raisen, sondern nur checken, weil highestSets bereits sehr hoch !!!
|
||||
@@ -4507,14 +4507,14 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
|
||||
} else raise = (potential - 4 ) * 2 * currentHand->getCurrentBeRo()->getHighestSet();
|
||||
@@ -4535,14 +4535,14 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
} else {
|
||||
// doch nich raisen, sondern nur checken, weil highestSets bereits sehr hoch !!!
|
||||
@@ -4553,14 +4553,14 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
} else raise = (potential - 3 ) * currentHand->getCurrentBeRo()->getHighestSet();
|
||||
}
|
||||
@@ -4573,7 +4573,7 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
if(mySet > currentHand->getCurrentBeRo()->getHighestSet()) currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
|
||||
}
|
||||
@@ -4583,7 +4583,7 @@ void LocalPlayer::preflopEngine3()
|
||||
myCash = myCash + mySet - currentHand->getCurrentBeRo()->getHighestSet() - raise;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet() + raise;
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4591,7 +4591,7 @@ void LocalPlayer::preflopEngine3()
|
||||
else {
|
||||
// CHECK --> wenn alle Sets glieich bei BigBlind und nich zu hohem Potential
|
||||
if(mySet == currentHand->getCurrentBeRo()->getHighestSet()) {
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// CALL --> bei normalen Potential
|
||||
else {
|
||||
@@ -4600,14 +4600,14 @@ void LocalPlayer::preflopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4697,14 +4697,14 @@ void LocalPlayer::flopEngine3()
|
||||
|
||||
// FOLD --> wenn potential negativ oder HighestSet zu hoch
|
||||
if(( potential*setToHighest<0 || (setToHighest > tempFold * currentHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * currentHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * currentHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * currentHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * currentHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 18) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
} else {
|
||||
// CHECK und BET --> wenn noch keiner was gesetzt hat
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() == 0) {
|
||||
// CHECK --> wenn Potential klein oder check-bluff sonst bet oder bet-bluff
|
||||
if((potential<3 || bluff >= 80) && bluff > 15) {
|
||||
// check
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// BET --> wenn Potential hoch
|
||||
else {
|
||||
@@ -4719,13 +4719,13 @@ void LocalPlayer::flopEngine3()
|
||||
if(mySet >= myCash) {
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash -= mySet;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
}
|
||||
@@ -4748,7 +4748,7 @@ void LocalPlayer::flopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
if(mySet > currentHand->getCurrentBeRo()->getHighestSet()) currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
|
||||
}
|
||||
@@ -4758,7 +4758,7 @@ void LocalPlayer::flopEngine3()
|
||||
myCash = myCash + mySet - currentHand->getCurrentBeRo()->getHighestSet() - raise;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet() + raise;
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
}
|
||||
// CALL --> bei normalen Potential
|
||||
@@ -4769,14 +4769,14 @@ void LocalPlayer::flopEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4864,14 +4864,14 @@ void LocalPlayer::turnEngine3()
|
||||
// FOLD
|
||||
// --> wenn potential negativ oder HighestSet zu hoch
|
||||
if( (potential*setToHighest<0 || (setToHighest > tempFold * currentHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * currentHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * currentHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * currentHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * currentHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 15) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
} else {
|
||||
// CHECK und BET --> wenn noch keiner was gesetzt hat
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() == 0) {
|
||||
// CHECK --> wenn Potential klein
|
||||
if((potential<2 || bluff >= 80) && bluff > 10) {
|
||||
// check
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// BET --> wenn Potential hoch
|
||||
else {
|
||||
@@ -4887,13 +4887,13 @@ void LocalPlayer::turnEngine3()
|
||||
if(mySet >= myCash) {
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash -= mySet;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
}
|
||||
@@ -4916,7 +4916,7 @@ void LocalPlayer::turnEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
if(mySet > currentHand->getCurrentBeRo()->getHighestSet()) currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
|
||||
}
|
||||
@@ -4926,7 +4926,7 @@ void LocalPlayer::turnEngine3()
|
||||
myCash = myCash + mySet - currentHand->getCurrentBeRo()->getHighestSet() - raise;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet() + raise;
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
}
|
||||
// CALL --> bei normalen Potential
|
||||
@@ -4936,14 +4936,14 @@ void LocalPlayer::turnEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5026,14 +5026,14 @@ void LocalPlayer::riverEngine3()
|
||||
// FOLD
|
||||
// --> wenn potential negativ oder HighestSet zu hoch
|
||||
if( (potential*setToHighest<0 || (setToHighest > tempFold * currentHand->getSmallBlind() && potential<1) || (setToHighest > 3 * tempFold * currentHand->getSmallBlind() && potential<2) || (setToHighest > 9 * tempFold * currentHand->getSmallBlind() && potential<3) || (setToHighest > 20*tempFold * currentHand->getSmallBlind() && potential<4) || (setToHighest > 40 *tempFold * currentHand->getSmallBlind() && potential<5)) && percent < 0.90 && bluff > 15) {
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
myAction = PLAYER_ACTION_FOLD;
|
||||
} else {
|
||||
// CHECK und BET --> wenn noch keiner was gesetzt hat
|
||||
if(currentHand->getCurrentBeRo()->getHighestSet() == 0) {
|
||||
// CHECK --> wenn Potential klein
|
||||
if((potential<2 || bluff >= 92) && bluff > 15) {
|
||||
// check
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
myAction = PLAYER_ACTION_CHECK;
|
||||
}
|
||||
// BET --> wenn Potential hoch
|
||||
else {
|
||||
@@ -5049,13 +5049,13 @@ void LocalPlayer::riverEngine3()
|
||||
if(mySet >= myCash) {
|
||||
mySet = myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash -= mySet;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
myAction = PLAYER_ACTION_BET;
|
||||
}
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
}
|
||||
@@ -5078,7 +5078,7 @@ void LocalPlayer::riverEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
if(mySet > currentHand->getCurrentBeRo()->getHighestSet()) currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
|
||||
}
|
||||
@@ -5088,7 +5088,7 @@ void LocalPlayer::riverEngine3()
|
||||
myCash = myCash + mySet - currentHand->getCurrentBeRo()->getHighestSet() - raise;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet() + raise;
|
||||
currentHand->getCurrentBeRo()->setHighestSet(mySet);
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
myAction = PLAYER_ACTION_RAISE;
|
||||
}
|
||||
}
|
||||
// CALL --> bei normalen Potential
|
||||
@@ -5098,14 +5098,14 @@ void LocalPlayer::riverEngine3()
|
||||
|
||||
mySet += myCash;
|
||||
myCash = 0;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
myAction = PLAYER_ACTION_ALLIN;
|
||||
|
||||
}
|
||||
// sonst
|
||||
else {
|
||||
myCash = myCash - currentHand->getCurrentBeRo()->getHighestSet() + mySet;
|
||||
mySet = currentHand->getCurrentBeRo()->getHighestSet();
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
myAction = PLAYER_ACTION_CALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,12 +113,12 @@ public:
|
||||
return myLastRelativeSet;
|
||||
}
|
||||
|
||||
void setMyAction(PlayerAction theValue, bool blind = 0) {
|
||||
void setMyAction(PlayerAction theValue, bool blind = 0) {
|
||||
myAction = theValue;
|
||||
// logging for human player
|
||||
if(myAction && !blind) currentHand->getGuiInterface()->logPlayerActionMsg(myName, myAction, mySet);
|
||||
}
|
||||
PlayerAction getMyAction() const {
|
||||
PlayerAction getMyAction() const {
|
||||
return myAction;
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ private:
|
||||
int myCash;
|
||||
int mySet;
|
||||
int myLastRelativeSet;
|
||||
PlayerAction myAction;
|
||||
PlayerAction myAction;
|
||||
int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big
|
||||
bool myActiveStatus; // 0 = inactive, 1 = active
|
||||
bool myStayOnTableStatus; // 0 = left, 1 = stay
|
||||
|
||||
Reference in New Issue
Block a user