buggy!!!
This commit is contained in:
@@ -46,7 +46,7 @@ HandInterface* LocalEngineFactory::createHand(boost::shared_ptr<EngineFactory> f
|
||||
|
||||
BoardInterface* LocalEngineFactory::createBoard() { return new LocalBoard; }
|
||||
|
||||
boost::shared_ptr<PlayerInterface> LocalEngineFactory::createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB) { return new LocalPlayer(myConfig, b, id, uniqueId, type, name, avatar, sC, aS, mB); }
|
||||
boost::shared_ptr<PlayerInterface> LocalEngineFactory::createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB) { return boost::shared_ptr<PlayerInterface> (new LocalPlayer(myConfig, b, id, uniqueId, type, name, avatar, sC, aS, mB)); }
|
||||
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > LocalEngineFactory::createBeRo(HandInterface* hi, int id, int aP, int dP, int sB) {
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ ClientBoard::~ClientBoard()
|
||||
}
|
||||
|
||||
void
|
||||
ClientBoard::setPlayer(PlayerInterface** p)
|
||||
ClientBoard::setPlayer(std::vector<boost::shared_ptr<PlayerInterface> > p)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playerArray = p;
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
#include <boardinterface.h>
|
||||
#include <boost/thread.hpp>
|
||||
#include <vector>
|
||||
|
||||
|
||||
class PlayerInterface;
|
||||
class HandInterface;
|
||||
@@ -32,7 +34,7 @@ public:
|
||||
ClientBoard();
|
||||
~ClientBoard();
|
||||
|
||||
void setPlayer(PlayerInterface**);
|
||||
void setPlayer(std::vector<boost::shared_ptr<PlayerInterface> >);
|
||||
void setHand(HandInterface*);
|
||||
|
||||
void setMyCards(int* theValue);
|
||||
@@ -51,7 +53,7 @@ public:
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
PlayerInterface **playerArray;
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > playerArray;
|
||||
HandInterface *actualHand;
|
||||
|
||||
int myCards[5];
|
||||
|
||||
@@ -47,7 +47,7 @@ BoardInterface* ClientEngineFactory::createBoard()
|
||||
|
||||
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)
|
||||
{
|
||||
return new ClientPlayer(NULL, b, id, uniqueId, type, name, avatar, sC, aS, mB);
|
||||
return boost::shared_ptr<PlayerInterface> (new ClientPlayer(NULL, b, id, uniqueId, type, name, avatar, sC, aS, mB));
|
||||
}
|
||||
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > ClientEngineFactory::createBeRo(HandInterface* hi, int id, int aP, int dP, int sB) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
ClientEngineFactory();
|
||||
~ClientEngineFactory();
|
||||
|
||||
HandInterface* createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, 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> > p, 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,7 +21,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ClientHand::ClientHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
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),
|
||||
smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
@@ -68,7 +68,7 @@ ClientHand::start()
|
||||
{
|
||||
}
|
||||
|
||||
PlayerInterface**
|
||||
std::vector<boost::shared_ptr<PlayerInterface> >
|
||||
ClientHand::getPlayerArray() const
|
||||
{
|
||||
return playerArray;
|
||||
|
||||
@@ -32,12 +32,12 @@
|
||||
class ClientHand : public HandInterface
|
||||
{
|
||||
public:
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, PlayerInterface**, int, int, int, int, int, int );
|
||||
ClientHand ( boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> > , int, int, int, int, int, int );
|
||||
~ClientHand();
|
||||
|
||||
void start();
|
||||
|
||||
PlayerInterface** getPlayerArray() const;
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > getPlayerArray() const;
|
||||
BoardInterface* getBoard() const;
|
||||
boost::shared_ptr<BeRoInterface> getPreflop() const;
|
||||
boost::shared_ptr<BeRoInterface> getFlop() const;
|
||||
@@ -91,7 +91,7 @@ class ClientHand : public HandInterface
|
||||
boost::shared_ptr<EngineFactory> myFactory;
|
||||
GuiInterface *myGui;
|
||||
BoardInterface *myBoard;
|
||||
PlayerInterface **playerArray;
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > playerArray;
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||
|
||||
int myID;
|
||||
|
||||
Reference in New Issue
Block a user