remove hand-object from board
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ClientBoard::ClientBoard()
|
||||
: currentHand(0), pot(0), sets(0)
|
||||
ClientBoard::ClientBoard(unsigned dp)
|
||||
: currentHand(0), pot(0), sets(0), dealerPosition(dp)
|
||||
{
|
||||
myCards[0] = myCards[1] = myCards[2] = myCards[3] = myCards[4] = 0;
|
||||
}
|
||||
@@ -94,6 +94,20 @@ ClientBoard::setSets(int theValue)
|
||||
sets = theValue;
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::setAllInCondition(bool theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
allInCondition = theValue;
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::setLastActionPlayer(unsigned theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
lastActionPlayer = theValue;
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::collectSets()
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class HandInterface;
|
||||
class ClientBoard : public BoardInterface
|
||||
{
|
||||
public:
|
||||
ClientBoard();
|
||||
ClientBoard(unsigned dealerPosition);
|
||||
~ClientBoard();
|
||||
|
||||
void setPlayerLists(PlayerList, PlayerList, PlayerList);
|
||||
@@ -45,6 +45,9 @@ public:
|
||||
int getSets() const;
|
||||
void setSets(int theValue);
|
||||
|
||||
void setAllInCondition(bool theValue);
|
||||
void setLastActionPlayer(unsigned theValue);
|
||||
|
||||
void collectSets();
|
||||
void collectPot();
|
||||
|
||||
@@ -72,6 +75,9 @@ private:
|
||||
int myCards[5];
|
||||
int pot;
|
||||
int sets;
|
||||
unsigned dealerPosition;
|
||||
bool allInCondition;
|
||||
unsigned lastActionPlayer;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,9 +40,9 @@ HandInterface* ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory>
|
||||
return new ClientHand(f, g, b, l, sl, apl, rpl, id, sP, dP, sB, sC);
|
||||
}
|
||||
|
||||
BoardInterface* ClientEngineFactory::createBoard()
|
||||
BoardInterface* ClientEngineFactory::createBoard(unsigned dp)
|
||||
{
|
||||
return new ClientBoard;
|
||||
return new ClientBoard(dp);
|
||||
}
|
||||
|
||||
boost::shared_ptr<PlayerInterface> ClientEngineFactory::createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB)
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
~ClientEngineFactory();
|
||||
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, Log *l, PlayerList sl, PlayerList apl, PlayerList rpl, int id, int sP, int dP, int sB,int sC);
|
||||
BoardInterface* createBoard();
|
||||
BoardInterface* createBoard(unsigned dp);
|
||||
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, unsigned dP, int sB);
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, Boar
|
||||
{
|
||||
PlayerListIterator it;
|
||||
|
||||
myBoard->setHand(this);
|
||||
|
||||
for(it=seatsList->begin(); it!=seatsList->end(); it++) {
|
||||
(*it)->setHand(this);
|
||||
// myFlipCards auf 0 setzen
|
||||
|
||||
Reference in New Issue
Block a user