bugfix for #275: remove dealerPosition from constructor of localBoard and transmit when it's needed

This commit is contained in:
floty committed 2014-03-02 00:50:28 +01:00
1 parent 3cbb365c61
commit 7f3c8a8608
14 files changed
+22 -36

No files matched your search

+3 -3
View File
@@ -36,8 +36,8 @@
using namespace std;
ClientBoard::ClientBoard(unsigned dp)
: pot(0), sets(0), dealerPosition(dp), allInCondition(false), lastActionPlayerID(0)
ClientBoard::ClientBoard()
: pot(0), sets(0), allInCondition(false), lastActionPlayerID(0)
{
myCards[0] = myCards[1] = myCards[2] = myCards[3] = myCards[4] = 0;
}
@@ -134,7 +134,7 @@ ClientBoard::collectPot()
}
void
ClientBoard::distributePot()
ClientBoard::distributePot(unsigned)
{
}
+2 -3
View File
@@ -44,7 +44,7 @@ class HandInterface;
class ClientBoard : public BoardInterface
{
public:
ClientBoard(unsigned dealerPosition);
ClientBoard();
~ClientBoard();
void setPlayerLists(PlayerList, PlayerList, PlayerList);
@@ -63,7 +63,7 @@ public:
void collectSets();
void collectPot();
void distributePot();
void distributePot(unsigned);
void determinePlayerNeedToShowCards();
std::list<unsigned> getWinners() const;
@@ -85,7 +85,6 @@ private:
int myCards[5];
int pot;
int sets;
unsigned dealerPosition;
bool allInCondition;
unsigned lastActionPlayerID;
};
@@ -55,9 +55,9 @@ ClientEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface
}
boost::shared_ptr<BoardInterface>
ClientEngineFactory::createBoard(unsigned dp)
ClientEngineFactory::createBoard()
{
return boost::shared_ptr<BoardInterface>(new ClientBoard(dp));
return boost::shared_ptr<BoardInterface>(new ClientBoard());
}
boost::shared_ptr<PlayerInterface>
@@ -52,7 +52,7 @@ public:
~ClientEngineFactory();
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<BoardInterface> createBoard();
virtual boost::shared_ptr<PlayerInterface> createPlayer(int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, bool sotS, int mB);
virtual std::vector<boost::shared_ptr<BeRoInterface> > createBeRo(HandInterface *hi, unsigned dP, int sB);
};