more polymorphie steps for BeRo
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "flopinterface.h"
|
||||
#include "turninterface.h"
|
||||
#include "riverinterface.h"
|
||||
#include "berointerface.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
@@ -43,7 +44,7 @@ public:
|
||||
virtual FlopInterface* createFlop(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||
virtual TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||
virtual RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB) =0;
|
||||
|
||||
virtual BeRoInterface* createBeRo() =0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -171,6 +171,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
|
||||
myFlop = myFactory->createFlop(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
myTurn = myFactory->createTurn(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
myRiver = myFactory->createRiver(this, myID, actualQuantityPlayers, dealerPosition, smallBlind);
|
||||
|
||||
myBeRo = myFactory->createBeRo();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <flopinterface.h>
|
||||
#include <turninterface.h>
|
||||
#include <riverinterface.h>
|
||||
#include <berointerface.h>
|
||||
|
||||
|
||||
class LocalHand : public HandInterface{
|
||||
@@ -97,6 +98,7 @@ private:
|
||||
FlopInterface *myFlop;
|
||||
TurnInterface *myTurn;
|
||||
RiverInterface *myRiver;
|
||||
BeRoInterface *myBeRo;
|
||||
|
||||
int myID;
|
||||
int actualQuantityPlayers;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//
|
||||
#include "clientbero.h"
|
||||
|
||||
ClientBeRo::ClientBeRo()
|
||||
ClientBeRo::ClientBeRo() : BeRoInterface()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,13 @@
|
||||
#ifndef CLIENTBERO_H
|
||||
#define CLIENTBERO_H
|
||||
|
||||
#include "berointerface.h"
|
||||
|
||||
|
||||
/**
|
||||
@author FThauer FHammer <webmaster@pokerth.net>
|
||||
*/
|
||||
class ClientBeRo{
|
||||
class ClientBeRo : public BeRoInterface{
|
||||
public:
|
||||
ClientBeRo();
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "clientflop.h"
|
||||
#include "clientturn.h"
|
||||
#include "clientriver.h"
|
||||
#include "clientbero.h"
|
||||
|
||||
|
||||
|
||||
ClientEngineFactory::ClientEngineFactory()
|
||||
@@ -72,3 +74,7 @@ RiverInterface* ClientEngineFactory::createRiver(HandInterface* hi, int id, int
|
||||
return new ClientRiver(hi, id, aP, dP, sB);
|
||||
}
|
||||
|
||||
BeRoInterface* ClientEngineFactory::createBeRo()
|
||||
{
|
||||
return new ClientBeRo();
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <flopinterface.h>
|
||||
#include <turninterface.h>
|
||||
#include <riverinterface.h>
|
||||
#include <berointerface.h>
|
||||
|
||||
|
||||
class ConfigFile;
|
||||
|
||||
@@ -44,6 +46,8 @@ public:
|
||||
FlopInterface* createFlop(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
TurnInterface* createTurn(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
|
||||
BeRoInterface* createBeRo();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user