engine 0.4 rev16
This commit is contained in:
1 parent
fd741792df
commit
73defd8fab
4 files changed
+20
-8
No files matched your search
@@ -85,6 +85,7 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe
|
|||||||
if(i) {
|
if(i) {
|
||||||
myTool.getRandNumber(1,100,1,&sBluff,0);
|
myTool.getRandNumber(1,100,1,&sBluff,0);
|
||||||
playerArray[i]->setSBluff(sBluff);
|
playerArray[i]->setSBluff(sBluff);
|
||||||
|
playerArray[i]->setSBluffStatus(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
k++;
|
k++;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
using namespace std;
|
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
|
// myBestHandPosition mit -1 initialisieren
|
||||||
int i;
|
int i;
|
||||||
@@ -235,12 +235,13 @@ void LocalPlayer::preflopEngine() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << sBluff << endl;
|
// cout << sBluff << endl;
|
||||||
|
|
||||||
// auf sBluff testen --> raise statt call oder fold
|
// 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()) {
|
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
|
// Gegner raisen ebenfalls -> call
|
||||||
if(actualHand->getPreflop()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
|
if(actualHand->getPreflop()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
|
||||||
@@ -285,11 +286,11 @@ void LocalPlayer::flopEngine() {
|
|||||||
|
|
||||||
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
||||||
// 1. Fold -- Call
|
// 1. Fold -- Call
|
||||||
myNiveau[0] = 42 + myDude4 - 6*(players - 2);
|
myNiveau[0] = 43 + myDude4 - 6*(players - 2);
|
||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 54 + myDude4 - 6*(players - 2);
|
myNiveau[1] = 55 + myDude4 - 6*(players - 2);
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
myNiveau[2] = 66 + myDude4 - 6*(players - 2);
|
myNiveau[2] = 67 + myDude4 - 6*(players - 2);
|
||||||
|
|
||||||
// eigenes mögliches highestSet
|
// eigenes mögliches highestSet
|
||||||
int individualHighestSet = actualHand->getFlop()->getHighestSet();
|
int individualHighestSet = actualHand->getFlop()->getHighestSet();
|
||||||
@@ -685,7 +686,7 @@ void LocalPlayer::turnEngine() {
|
|||||||
|
|
||||||
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
||||||
// 1. Fold -- Call
|
// 1. Fold -- Call
|
||||||
myNiveau[0] = 44 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
@@ -837,7 +838,7 @@ void LocalPlayer::riverEngine() {
|
|||||||
|
|
||||||
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
// Niveaus setzen + Dude + Anzahl Gegenspieler
|
||||||
// 1. Fold -- Call
|
// 1. Fold -- Call
|
||||||
myNiveau[0] = 44 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[0] = 45 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[1] = 55 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ public:
|
|||||||
void setSBluff ( int theValue ) { sBluff = theValue; }
|
void setSBluff ( int theValue ) { sBluff = theValue; }
|
||||||
int getSBluff() const { return sBluff; }
|
int getSBluff() const { return sBluff; }
|
||||||
|
|
||||||
|
void setSBluffStatus ( bool theValue ) { sBluffStatus = theValue; }
|
||||||
|
bool getSBluffStatus() const { return sBluffStatus; }
|
||||||
|
|
||||||
void action();
|
void action();
|
||||||
|
|
||||||
void preflopEngine();
|
void preflopEngine();
|
||||||
@@ -130,6 +133,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HandInterface *actualHand;
|
HandInterface *actualHand;
|
||||||
BoardInterface *actualBoard;
|
BoardInterface *actualBoard;
|
||||||
@@ -164,6 +170,7 @@ private:
|
|||||||
bool myAggressive[7];
|
bool myAggressive[7];
|
||||||
|
|
||||||
int sBluff;
|
int sBluff;
|
||||||
|
bool sBluffStatus;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ public:
|
|||||||
virtual void setSBluff ( int theValue ) =0;
|
virtual void setSBluff ( int theValue ) =0;
|
||||||
virtual int getSBluff() const =0;
|
virtual int getSBluff() const =0;
|
||||||
|
|
||||||
|
virtual void setSBluffStatus ( bool theValue ) =0;
|
||||||
|
virtual bool getSBluffStatus() const =0;
|
||||||
|
|
||||||
virtual void action() =0;
|
virtual void action() =0;
|
||||||
|
|
||||||
virtual void preflopEngine() =0;
|
virtual void preflopEngine() =0;
|
||||||
|
|||||||
Reference in new issue
Block a user