This commit is contained in:
doitux
2007-08-10 23:16:21 +00:00
parent 8319442b6a
commit a9a2d33e3f
13 changed files with 48 additions and 33 deletions
@@ -35,7 +35,7 @@ ClientEngineFactory::~ClientEngineFactory()
}
HandInterface* ClientEngineFactory::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* 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)
{
return new ClientHand(f, g, b, p, id, sP, aP, dP, sB, sC);
}
@@ -45,7 +45,7 @@ BoardInterface* ClientEngineFactory::createBoard()
return new ClientBoard;
}
PlayerInterface* ClientEngineFactory::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> 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);
}
@@ -25,6 +25,10 @@
#include <boardinterface.h>
#include <playerinterface.h>
#include <boost/shared_ptr.hpp>
#include <vector>
class ConfigFile;
class ClientEngineFactory : public EngineFactory
@@ -35,7 +39,7 @@ public:
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);
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);
};