diff --git a/src/engine/local_engine/localhand.cpp b/src/engine/local_engine/localhand.cpp index eb0c72c0..051ed173 100755 --- a/src/engine/local_engine/localhand.cpp +++ b/src/engine/local_engine/localhand.cpp @@ -85,6 +85,7 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe if(i) { myTool.getRandNumber(1,100,1,&sBluff,0); playerArray[i]->setSBluff(sBluff); + playerArray[i]->setSBluffStatus(0); } k++; diff --git a/src/engine/local_engine/localplayer.cpp b/src/engine/local_engine/localplayer.cpp index f0f03371..2f84ac60 100755 --- a/src/engine/local_engine/localplayer.cpp +++ b/src/engine/local_engine/localplayer.cpp @@ -23,7 +23,7 @@ using namespace std; -LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, std::string avatar, int sC, bool aS, int mB) : PlayerInterface(), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0) +LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, std::string avatar, int sC, bool aS, int mB) : PlayerInterface(), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0) { // myBestHandPosition mit -1 initialisieren int i; @@ -235,12 +235,13 @@ void LocalPlayer::preflopEngine() { } } - cout << sBluff << endl; +// cout << sBluff << endl; // auf sBluff testen --> raise statt call oder fold if(sBluff < 100/(((actualHand->getActualQuantityPlayers()-2)*6)+3) && myOdds < myNiveau[2] && actualHand->getPreflop()->getHighestSet() == 2*actualHand->getSmallBlind()) { - cout << "sBLUFF!" << endl; +// cout << "sBLUFF!" << endl; + sBluffStatus = 1; // Gegner raisen ebenfalls -> call if(actualHand->getPreflop()->getHighestSet() >= 12*actualHand->getSmallBlind()) { @@ -285,11 +286,11 @@ void LocalPlayer::flopEngine() { // Niveaus setzen + Dude + Anzahl Gegenspieler // 1. Fold -- Call - myNiveau[0] = 42 + myDude4 - 6*(players - 2); + myNiveau[0] = 43 + myDude4 - 6*(players - 2); // 2. Check -- Bet - myNiveau[1] = 54 + myDude4 - 6*(players - 2); + myNiveau[1] = 55 + myDude4 - 6*(players - 2); // 3. Call -- Raise - myNiveau[2] = 66 + myDude4 - 6*(players - 2); + myNiveau[2] = 67 + myDude4 - 6*(players - 2); // eigenes mögliches highestSet int individualHighestSet = actualHand->getFlop()->getHighestSet(); @@ -685,7 +686,7 @@ void LocalPlayer::turnEngine() { // Niveaus setzen + Dude + Anzahl Gegenspieler // 1. Fold -- Call - myNiveau[0] = 44 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; + myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; // 2. Check -- Bet myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; // 3. Call -- Raise @@ -837,7 +838,7 @@ void LocalPlayer::riverEngine() { // Niveaus setzen + Dude + Anzahl Gegenspieler // 1. Fold -- Call - myNiveau[0] = 44 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; + myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; // 2. Check -- Bet myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/; // 3. Call -- Raise diff --git a/src/engine/local_engine/localplayer.h b/src/engine/local_engine/localplayer.h index 3898b21a..4196bce9 100755 --- a/src/engine/local_engine/localplayer.h +++ b/src/engine/local_engine/localplayer.h @@ -108,6 +108,9 @@ public: void setSBluff ( int theValue ) { sBluff = theValue; } int getSBluff() const { return sBluff; } + void setSBluffStatus ( bool theValue ) { sBluffStatus = theValue; } + bool getSBluffStatus() const { return sBluffStatus; } + void action(); void preflopEngine(); @@ -127,6 +130,9 @@ public: void readFile(); void evaluation(int, int); + + + @@ -164,6 +170,7 @@ private: bool myAggressive[7]; int sBluff; + bool sBluffStatus; }; diff --git a/src/engine/playerinterface.h b/src/engine/playerinterface.h index 3030957f..dad88029 100644 --- a/src/engine/playerinterface.h +++ b/src/engine/playerinterface.h @@ -82,6 +82,9 @@ public: virtual void setSBluff ( int theValue ) =0; virtual int getSBluff() const =0; + + virtual void setSBluffStatus ( bool theValue ) =0; + virtual bool getSBluffStatus() const =0; virtual void action() =0;