first polymorphie steps for BeRo (BettingRounds)

This commit is contained in:
doitux
2007-08-04 01:30:59 +00:00
parent 0cd9c9c769
commit 993465a213
9 changed files with 188 additions and 28 deletions
+10 -4
View File
@@ -79,6 +79,7 @@ HEADERS += src/game.h \
src/engine/preflopinterface.h \ src/engine/preflopinterface.h \
src/engine/riverinterface.h \ src/engine/riverinterface.h \
src/engine/turninterface.h \ src/engine/turninterface.h \
src/engine/berointerface.h \
src/gui/guiinterface.h \ src/gui/guiinterface.h \
src/net/clientcallback.h \ src/net/clientcallback.h \
src/net/clientcontext.h \ src/net/clientcontext.h \
@@ -105,6 +106,7 @@ HEADERS += src/game.h \
src/engine/local_engine/localriver.h \ src/engine/local_engine/localriver.h \
src/engine/local_engine/localturn.h \ src/engine/local_engine/localturn.h \
src/engine/local_engine/tools.h \ src/engine/local_engine/tools.h \
src/engine/local_engine/localbero.h \
src/engine/network_engine/clientboard.h \ src/engine/network_engine/clientboard.h \
src/engine/network_engine/clientenginefactory.h \ src/engine/network_engine/clientenginefactory.h \
src/engine/network_engine/clientflop.h \ src/engine/network_engine/clientflop.h \
@@ -113,6 +115,7 @@ HEADERS += src/game.h \
src/engine/network_engine/clientpreflop.h \ src/engine/network_engine/clientpreflop.h \
src/engine/network_engine/clientriver.h \ src/engine/network_engine/clientriver.h \
src/engine/network_engine/clientturn.h \ src/engine/network_engine/clientturn.h \
src/engine/network_engine/clientbero.h \
src/gui/qt/sound/sdlplayer.h \ src/gui/qt/sound/sdlplayer.h \
src/gui/qt/mainwindow/mainwindowimpl.h \ src/gui/qt/mainwindow/mainwindowimpl.h \
src/gui/qt/mainwindow/mycardspixmaplabel.h \ src/gui/qt/mainwindow/mycardspixmaplabel.h \
@@ -164,6 +167,7 @@ SOURCES += src/game.cpp \
src/engine/preflopinterface.cpp \ src/engine/preflopinterface.cpp \
src/engine/riverinterface.cpp \ src/engine/riverinterface.cpp \
src/engine/turninterface.cpp \ src/engine/turninterface.cpp \
src/engine/berointerface.cpp \
src/gui/guiinterface.cpp \ src/gui/guiinterface.cpp \
src/core/common/thread.cpp \ src/core/common/thread.cpp \
src/core/tinyxml/tinystr.cpp \ src/core/tinyxml/tinystr.cpp \
@@ -180,6 +184,7 @@ SOURCES += src/game.cpp \
src/engine/local_engine/localriver.cpp \ src/engine/local_engine/localriver.cpp \
src/engine/local_engine/localturn.cpp \ src/engine/local_engine/localturn.cpp \
src/engine/local_engine/tools.cpp \ src/engine/local_engine/tools.cpp \
src/engine/local_engine/localbero.cpp \
src/engine/network_engine/clientboard.cpp \ src/engine/network_engine/clientboard.cpp \
src/engine/network_engine/clientenginefactory.cpp \ src/engine/network_engine/clientenginefactory.cpp \
src/engine/network_engine/clientflop.cpp \ src/engine/network_engine/clientflop.cpp \
@@ -188,6 +193,7 @@ SOURCES += src/game.cpp \
src/engine/network_engine/clientpreflop.cpp \ src/engine/network_engine/clientpreflop.cpp \
src/engine/network_engine/clientriver.cpp \ src/engine/network_engine/clientriver.cpp \
src/engine/network_engine/clientturn.cpp \ src/engine/network_engine/clientturn.cpp \
src/engine/network_engine/clientbero.cpp \
src/net/common/connectdata.cpp \ src/net/common/connectdata.cpp \
src/net/common/clientcallback.cpp \ src/net/common/clientcallback.cpp \
src/net/common/clientcontext.cpp \ src/net/common/clientcontext.cpp \
@@ -272,19 +278,19 @@ win32{
src/net/linux/socket_startup.cpp src/net/linux/socket_startup.cpp
} }
unix:!mac{ unix: !mac{
exists( /usr/lib/libboost_thread-mt.so ) { exists( /usr/lib/libboost_thread-mt.so ){
message("Found libboost_thread-mt") message("Found libboost_thread-mt")
LIBS += -lboost_thread-mt LIBS += -lboost_thread-mt
} }
exists( /usr/lib/libboost_thread.so ) { exists( /usr/lib/libboost_thread.so ){
message("Found libboost_thread") message("Found libboost_thread")
LIBS += -lboost_thread LIBS += -lboost_thread
} }
LIBS += -lcrypto -lSDL_mixer LIBS += -lcrypto -lSDL_mixer
## My release static libs ## My release static libs
#LIBS += -lcrypto -lSDL_mixer -lSDL -lmikmod #LIBS += -lcrypto -lSDL_mixer -lSDL -lmikmod
} }
mac{ mac{
# make it universal # make it universal
+23
View File
@@ -0,0 +1,23 @@
//
// C++ Implementation: berointerface
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "berointerface.h"
BeRoInterface::BeRoInterface()
{
}
BeRoInterface::~BeRoInterface()
{
}
+26
View File
@@ -0,0 +1,26 @@
//
// C++ Interface: berointerface
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef BEROINTERFACE_H
#define BEROINTERFACE_H
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
class BeRoInterface{
public:
BeRoInterface();
~BeRoInterface();
};
#endif
+23
View File
@@ -0,0 +1,23 @@
//
// C++ Implementation: localbero
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "localbero.h"
LocalBeRo::LocalBeRo() : BeRoInterface()
{
}
LocalBeRo::~LocalBeRo()
{
}
+28
View File
@@ -0,0 +1,28 @@
//
// C++ Interface: localbero
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef LOCALBERO_H
#define LOCALBERO_H
#include "berointerface.h"
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
class LocalBeRo : public BeRoInterface{
public:
LocalBeRo();
~LocalBeRo();
};
#endif
@@ -26,6 +26,7 @@
#include "localflop.h" #include "localflop.h"
#include "localturn.h" #include "localturn.h"
#include "localriver.h" #include "localriver.h"
#include "localbero.h"
#include <configfile.h> #include <configfile.h>
@@ -54,3 +55,5 @@ FlopInterface* LocalEngineFactory::createFlop(HandInterface* hi, int id, int aP,
TurnInterface* LocalEngineFactory::createTurn(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalTurn(hi, id, aP, dP, sB); } TurnInterface* LocalEngineFactory::createTurn(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalTurn(hi, id, aP, dP, sB); }
RiverInterface* LocalEngineFactory::createRiver(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalRiver(hi, id, aP, dP, sB); } RiverInterface* LocalEngineFactory::createRiver(HandInterface* hi, int id, int aP, int dP, int sB) { return new LocalRiver(hi, id, aP, dP, sB); }
BeRoInterface* LocalEngineFactory::createBeRo() { return new LocalBeRo(); }
@@ -29,6 +29,7 @@
#include <flopinterface.h> #include <flopinterface.h>
#include <turninterface.h> #include <turninterface.h>
#include <riverinterface.h> #include <riverinterface.h>
#include <berointerface.h>
class ConfigFile; class ConfigFile;
@@ -45,6 +46,7 @@ public:
FlopInterface* createFlop(HandInterface* hi, int id, int aP, int dP, int sB); FlopInterface* createFlop(HandInterface* hi, int id, int aP, int dP, int sB);
TurnInterface* createTurn(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); RiverInterface* createRiver(HandInterface* hi, int id, int aP, int dP, int sB);
BeRoInterface* createBeRo();
private: private:
ConfigFile *myConfig; ConfigFile *myConfig;
+23
View File
@@ -0,0 +1,23 @@
//
// C++ Implementation: clientbero
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "clientbero.h"
ClientBeRo::ClientBeRo()
{
}
ClientBeRo::~ClientBeRo()
{
}
+26
View File
@@ -0,0 +1,26 @@
//
// C++ Interface: clientbero
//
// Description:
//
//
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef CLIENTBERO_H
#define CLIENTBERO_H
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
class ClientBeRo{
public:
ClientBeRo();
~ClientBeRo();
};
#endif