buggy!!!
This commit is contained in:
@@ -33,7 +33,7 @@ LocalBoard::~LocalBoard()
|
||||
{
|
||||
}
|
||||
|
||||
void LocalBoard::setPlayer(PlayerInterface** p) { playerArray = p; }
|
||||
void LocalBoard::setPlayer(std::vector<boost::shared_ptr<PlayerInterface> > p) { playerArray = p; }
|
||||
|
||||
void LocalBoard::setHand(HandInterface* br) { currentHand = br; }
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <boardinterface.h>
|
||||
|
||||
@@ -34,7 +35,7 @@ public:
|
||||
LocalBoard();
|
||||
~LocalBoard();
|
||||
|
||||
void setPlayer(PlayerInterface**);
|
||||
void setPlayer(std::vector<boost::shared_ptr<PlayerInterface> >);
|
||||
void setHand(HandInterface*);
|
||||
|
||||
void setMyCards(int* theValue) { int i; for(i=0; i<5; i++) myCards[i] = theValue[i]; }
|
||||
@@ -52,7 +53,7 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
PlayerInterface **playerArray;
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > playerArray;
|
||||
HandInterface *currentHand;
|
||||
|
||||
int myCards[5];
|
||||
|
||||
@@ -42,11 +42,11 @@ LocalEngineFactory::~LocalEngineFactory()
|
||||
}
|
||||
|
||||
|
||||
HandInterface* LocalEngineFactory::createHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC) { return new LocalHand(f, g, b, p, id, sP, aP, dP, sB, sC); }
|
||||
HandInterface* LocalEngineFactory::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) { return new LocalHand(f, g, b, p, id, sP, aP, dP, sB, sC); }
|
||||
|
||||
BoardInterface* LocalEngineFactory::createBoard() { return new LocalBoard; }
|
||||
|
||||
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 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) {
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
#include <boardinterface.h>
|
||||
#include <playerinterface.h>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <vector>
|
||||
|
||||
class ConfigFile;
|
||||
|
||||
class LocalEngineFactory : public EngineFactory
|
||||
@@ -34,9 +37,9 @@ public:
|
||||
LocalEngineFactory(ConfigFile*);
|
||||
~LocalEngineFactory();
|
||||
|
||||
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();
|
||||
PlayerInterface* createPlayer(BoardInterface *b, int id, unsigned uniqueId, PlayerType type, std::string name, std::string avatar, int sC, bool aS, int mB);
|
||||
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);
|
||||
|
||||
private:
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardInterface *b, PlayerInterface **p, int id, int sP, int aP, int dP, int sB,int sC)
|
||||
LocalHand::LocalHand(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), myBeRo(0), myID(id), actualQuantityPlayers(aP), startQuantityPlayers(sP), dealerPosition(dP), actualRound(0), smallBlind(sB), startCash(sC), activePlayersCounter(aP), lastPlayersTurn(0), allInCondition(0),
|
||||
cardsShown(false), bettingRoundsPlayed(0)
|
||||
{
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
class LocalHand : public HandInterface{
|
||||
public:
|
||||
LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, PlayerInterface**, int, int, int, int, int, int);
|
||||
LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface*, BoardInterface*, std::vector<boost::shared_ptr<PlayerInterface> >, int, int, int, int, int, int);
|
||||
~LocalHand();
|
||||
|
||||
void start();
|
||||
|
||||
PlayerInterface** getPlayerArray() const { return playerArray; }
|
||||
std::vector<boost::shared_ptr<PlayerInterface> > getPlayerArray() const { return playerArray; }
|
||||
BoardInterface* getBoard() const { return myBoard; }
|
||||
boost::shared_ptr<BeRoInterface> getPreflop() const { return myBeRo[GAME_STATE_PREFLOP]; }
|
||||
boost::shared_ptr<BeRoInterface> getFlop() const { return myBeRo[GAME_STATE_FLOP]; }
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
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