Network: First round seems to work fine now. Pot/sets not yet displayed correctly.

This commit is contained in:
lotodore
2007-05-24 20:26:23 +00:00
parent 69ab45c902
commit 5431f0b93a
19 changed files with 233 additions and 147 deletions
+5 -5
View File
@@ -51,11 +51,11 @@ ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, Boar
// the rest of the buttons are assigned later as received from the server.
// Preflop, Flop, Turn und River erstellen
myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myFlop = myFactory->createFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myTurn = myFactory->createTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myRiver = myFactory->createRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
// Preflop, Flop, Turn und River erstellen
myPreflop = myFactory->createPreflop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myFlop = myFactory->createFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myTurn = myFactory->createTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
myRiver = myFactory->createRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
}
+1 -1
View File
@@ -23,7 +23,7 @@ using namespace std;
ClientPlayer::ClientPlayer(ConfigFile *c, BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB)
: PlayerInterface(), myConfig(c), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myUniqueID(uniqueId), myType(type), 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)
: PlayerInterface(), myConfig(c), actualHand(0), actualBoard(b), myCardsValue(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(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
{
}
+15 -12
View File
@@ -41,10 +41,10 @@ public:
unsigned getMyUniqueID() const { return myUniqueID; }
PlayerType getMyType() const { return myType; }
void setMyDude(const int& theValue) { myDude = theValue; }
void setMyDude(int theValue) { myDude = theValue; }
int getMyDude() const { return myDude; }
void setMyDude4(const int& theValue) { myDude4 = theValue; }
void setMyDude4(int theValue) { myDude4 = theValue; }
int getMyDude4() const { return myDude4; }
void setMyName(const std::string& theValue) { myName = theValue; }
@@ -53,17 +53,19 @@ public:
void setMyAvatar(const std::string& theValue) { myAvatar = theValue; }
std::string getMyAvatar() const { return myAvatar; }
void setMyCash(const int& theValue) { myCash = theValue; }
void setMyCash(int theValue) { myCash = theValue; }
int getMyCash() const { return myCash; }
void setMySet(const int& theValue) { mySet += theValue; myCash -= theValue; }
void setMySetNull() { mySet = 0; }
int getMySet() const { return mySet;}
void setMySet(int theValue) { myLastRelativeSet = theValue; mySet += theValue; myCash -= theValue; }
void setMySetAbsolute(int theValue) { mySet = theValue; }
void setMySetNull() { mySet = 0; }
int getMySet() const { return mySet;}
int getMyLastRelativeSet() const { return myLastRelativeSet; }
void setMyAction(const int& theValue) { myAction = theValue; }
void setMyAction(int theValue) { myAction = theValue; }
int getMyAction() const { return myAction; }
void setMyButton(const int& theValue) { myButton = theValue; }
void setMyButton(int theValue) { myButton = theValue; }
int getMyButton() const { return myButton; }
void setMyActiveStatus(bool theValue) { myActiveStatus = theValue; }
@@ -78,18 +80,18 @@ public:
void setMyCardsFlip(bool theValue){ myCardsFlip = theValue;}
bool getMyCardsFlip() const{ return myCardsFlip;}
void setMyCardsValueInt(const int& theValue) { myCardsValueInt = theValue;}
void setMyCardsValueInt(int theValue) { myCardsValueInt = theValue;}
int getMyCardsValueInt() const { return myCardsValueInt; }
int* getMyBestHandPosition() { return myBestHandPosition; }
void setMyRoundStartCash(const int& theValue) { myRoundStartCash = theValue;}
void setMyRoundStartCash(int theValue) { myRoundStartCash = theValue;}
int getMyRoundStartCash() const { return myRoundStartCash; }
void setMyAverageSets(const int& theValue) { myAverageSets[0] = myAverageSets[1]; myAverageSets[1] = myAverageSets[2]; myAverageSets[2] = myAverageSets[3]; myAverageSets[3] = theValue; }
void setMyAverageSets(int theValue) { myAverageSets[0] = myAverageSets[1]; myAverageSets[1] = myAverageSets[2]; myAverageSets[2] = myAverageSets[3]; myAverageSets[3] = theValue; }
int getMyAverageSets() const { return (myAverageSets[0]+myAverageSets[1]+myAverageSets[2]+myAverageSets[3])/4; }
void setMyAggressive(const bool& theValue) {
void setMyAggressive(bool theValue) {
int i;
for(i=0; i<6; i++) {
myAggressive[i] = myAggressive[i+1];
@@ -160,6 +162,7 @@ private:
int myCards[2];
int myCash;
int mySet;
int myLastRelativeSet;
int myAction; // 0 = none, 1 = fold, 2 = check, 3 = call, 4 = bet, 5 = raise, 6 = allin
int myButton; // 0 = none, 1 = dealer, 2 =small, 3 = big
bool myActiveStatus; // 0 = inactive, 1 = active