adds activePlayerList and runningPlayerList
This commit is contained in:
@@ -34,10 +34,12 @@ ClientBoard::~ClientBoard()
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::setPlayer(std::vector<boost::shared_ptr<PlayerInterface> > p)
|
||||
ClientBoard::setPlayerLists(std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playerArray = p;
|
||||
playerArray = sl;
|
||||
activePlayerList = apl;
|
||||
runningPlayerList = rpl;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
ClientBoard();
|
||||
~ClientBoard();
|
||||
|
||||
void setPlayer(std::vector<boost::shared_ptr<PlayerInterface> >);
|
||||
void setPlayerLists(std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList);
|
||||
void setHand(HandInterface*);
|
||||
|
||||
void setMyCards(int* theValue);
|
||||
@@ -54,6 +54,9 @@ private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > playerArray;
|
||||
PlayerList activePlayerList;
|
||||
PlayerList runningPlayerList;
|
||||
|
||||
HandInterface *actualHand;
|
||||
|
||||
int myCards[5];
|
||||
|
||||
@@ -35,9 +35,9 @@ ClientEngineFactory::~ClientEngineFactory()
|
||||
}
|
||||
|
||||
|
||||
HandInterface* ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
HandInterface* ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
{
|
||||
return new ClientHand(f, g, b, p, id, sP, aP, dP, sB, sC);
|
||||
return new ClientHand(f, g, b, sl, apl, rpl, id, sP, aP, dP, sB, sC);
|
||||
}
|
||||
|
||||
BoardInterface* ClientEngineFactory::createBoard()
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
ClientEngineFactory();
|
||||
~ClientEngineFactory();
|
||||
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > p, int id, int sP, int aP, int dP, int sB,int sC);
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC);
|
||||
BoardInterface* createBoard();
|
||||
boost::shared_ptr<PlayerInterface> createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB);
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(p), myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, std::vector<boost::shared_ptr<PlayerInterface> > sl, PlayerList apl, PlayerList rpl, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
: myFactory(f), myGui(g), myBoard(b), playerArray(sl), activePlayerList(apl), runningPlayerList(rpl), myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0),
|
||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
class ClientHand : public HandInterface
|
||||
{
|
||||
public:
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> > , int, int, int, int, int, int );
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, PlayerList, PlayerList , int, int, int, int, int, int );
|
||||
~ClientHand();
|
||||
|
||||
void start();
|
||||
@@ -91,7 +91,11 @@ class ClientHand : public HandInterface
|
||||
boost::shared_ptr<EngineFactory> myFactory;
|
||||
GuiInterface *myGui;
|
||||
BoardInterface *myBoard;
|
||||
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > playerArray;
|
||||
PlayerList activePlayerList;
|
||||
PlayerList runningPlayerList;
|
||||
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||
|
||||
int myID;
|
||||
|
||||
Reference in New Issue
Block a user