applying astyle

This commit is contained in:
floty
2011-10-26 22:29:47 +00:00
parent fa01ab57d6
commit 7f13da91e5
38 changed files with 443 additions and 447 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ class HandInterface;
class ClientBeRo : public BeRoInterface
{
public:
ClientBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS);
ClientBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS);
~ClientBeRo();
GameState getMyBeRoID() const;
+2 -2
View File
@@ -24,7 +24,7 @@
using namespace std;
ClientBoard::ClientBoard(unsigned dp)
: pot(0), sets(0), dealerPosition(dp), allInCondition(false), lastActionPlayerID(0)
: pot(0), sets(0), dealerPosition(dp), allInCondition(false), lastActionPlayerID(0)
{
myCards[0] = myCards[1] = myCards[2] = myCards[3] = myCards[4] = 0;
}
@@ -98,7 +98,7 @@ void
ClientBoard::setLastActionPlayerID(unsigned theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
lastActionPlayerID = theValue;
lastActionPlayerID = theValue;
}
void
+2 -2
View File
@@ -45,7 +45,7 @@ public:
void setSets(int theValue);
void setAllInCondition(bool theValue);
void setLastActionPlayerID(unsigned theValue);
void setLastActionPlayerID(unsigned theValue);
void collectSets();
void collectPot();
@@ -74,7 +74,7 @@ private:
int sets;
unsigned dealerPosition;
bool allInCondition;
unsigned lastActionPlayerID;
unsigned lastActionPlayerID;
};
#endif
@@ -58,11 +58,11 @@ ClientEngineFactory::createBeRo(HandInterface *hi, unsigned dP, int sB)
{
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_PREFLOP)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_FLOP)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_TURN)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_RIVER)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_POST_RIVER)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_PREFLOP)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_FLOP)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_TURN)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_RIVER)));
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRo(hi, dP, sB, GAME_STATE_POST_RIVER)));
return myBeRo;
@@ -41,7 +41,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);
};
#endif
+7 -7
View File
@@ -22,8 +22,8 @@
using namespace std;
ClientHand::ClientHand(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)
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(GAME_STATE_PREFLOP),
smallBlind(sB), startCash(sC), previousPlayerID(-1), allInCondition(0),
: myFactory(f), myGui(g), myBoard(b), myLog(l), seatsList(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), startQuantityPlayers(sP), dealerPosition(dP), currentRound(GAME_STATE_PREFLOP),
smallBlind(sB), startCash(sC), previousPlayerID(-1), allInCondition(0),
cardsShown(false), bettingRoundsPlayed(0)
{
PlayerListIterator it;
@@ -51,7 +51,7 @@ ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, boos
// the rest of the buttons are assigned later as received from the server.
// Preflop, Flop, Turn und River erstellen
myBeRo = myFactory->createBeRo(this, dealerPosition, smallBlind);
myBeRo = myFactory->createBeRo(this, dealerPosition, smallBlind);
}
@@ -290,28 +290,28 @@ void
ClientHand::setPreviousPlayerID(int theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
previousPlayerID = theValue;
previousPlayerID = theValue;
}
int
ClientHand::getPreviousPlayerID() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return previousPlayerID;
return previousPlayerID;
}
void
ClientHand::setLastActionPlayerID (unsigned theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
lastActionPlayerID = theValue;
lastActionPlayerID = theValue;
}
unsigned
ClientHand::getLastActionPlayerID() const
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return lastActionPlayerID;
return lastActionPlayerID;
}
void
+9 -9
View File
@@ -63,8 +63,8 @@ public:
void setStartQuantityPlayers ( int theValue );
int getStartQuantityPlayers() const;
void setCurrentRound ( GameState theValue );
GameState getCurrentRound() const;
void setCurrentRound ( GameState theValue );
GameState getCurrentRound() const;
void setDealerPosition ( int theValue );
int getDealerPosition() const;
@@ -81,11 +81,11 @@ public:
void setBettingRoundsPlayed ( int theValue );
int getBettingRoundsPlayed() const;
void setPreviousPlayerID ( int theValue );
int getPreviousPlayerID() const;
void setPreviousPlayerID ( int theValue );
int getPreviousPlayerID() const;
void setLastActionPlayerID ( unsigned theValue );
unsigned getLastActionPlayerID() const;
void setLastActionPlayerID ( unsigned theValue );
unsigned getLastActionPlayerID() const;
void setCardsShown ( bool theValue );
bool getCardsShown() const;
@@ -115,12 +115,12 @@ private:
int myID;
int startQuantityPlayers;
unsigned dealerPosition;
GameState currentRound;
GameState currentRound;
int smallBlind;
int startCash;
int previousPlayerID;
unsigned lastActionPlayerID;
int previousPlayerID;
unsigned lastActionPlayerID;
bool allInCondition;
bool cardsShown;
+1 -1
View File
@@ -25,7 +25,7 @@ using namespace std;
ClientPlayer::ClientPlayer(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), myButton(mB), myActiveStatus(aS), myStayOnTableStatus(true), myTurn(false), myCardsFlip(false), myRoundStartCash(0),
myAction(PLAYER_ACTION_NONE), myButton(mB), myActiveStatus(aS), myStayOnTableStatus(true), myTurn(false), myCardsFlip(false), myRoundStartCash(0),
lastMoneyWon(0), sBluff(0), sBluffStatus(false), myWinnerState(false), m_isConnected(false)
{
myBestHandPosition[0] = myBestHandPosition[1] = myBestHandPosition[2] = myBestHandPosition[3] = myBestHandPosition[4] = 0;
+3 -3
View File
@@ -64,8 +64,8 @@ public:
int getMySet() const;
int getMyLastRelativeSet() const;
void setMyAction(PlayerAction theValue, bool blind);
PlayerAction getMyAction() const;
void setMyAction(PlayerAction theValue, bool blind);
PlayerAction getMyAction() const;
void setMyButton(int theValue);
int getMyButton() const;
@@ -172,7 +172,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