more polymorphie steps for BeRo - local game --> unstable

This commit is contained in:
doitux
2007-08-04 21:30:20 +00:00
parent 1f00b3f458
commit 07f8a2aaeb
19 changed files with 87 additions and 45 deletions
@@ -11,7 +11,7 @@
//
#include "clientberofactory.h"
ClientBeRoFactory::ClientBeRoFactory()
ClientBeRoFactory::ClientBeRoFactory(HandInterface* hi)
: BeRoFactoryInterface()
{
}
@@ -22,3 +22,4 @@ ClientBeRoFactory::~ClientBeRoFactory()
}
BeRoInterface* ClientBeRoFactory::switchRounds() {}
@@ -13,6 +13,7 @@
#define CLIENTBEROFACTORY_H
#include <berofactoryinterface.h>
#include <handinterface.h>
/**
@author FThauer FHammer <webmaster@pokerth.net>
@@ -20,10 +21,12 @@
class ClientBeRoFactory : public BeRoFactoryInterface
{
public:
ClientBeRoFactory();
ClientBeRoFactory(HandInterface* hi);
~ClientBeRoFactory();
BeRoInterface* switchRounds();
};
#endif
@@ -75,12 +75,12 @@ RiverInterface* ClientEngineFactory::createRiver(HandInterface* hi, int id, int
return new ClientRiver(hi, id, aP, dP, sB);
}
BeRoInterface* ClientEngineFactory::createBeRo()
{
return new ClientBeRo();
}
// BeRoInterface* ClientEngineFactory::createBeRo()
// {
// return new ClientBeRo();
// }
BeRoFactoryInterface* ClientEngineFactory::createBeRoFactory()
BeRoFactoryInterface* ClientEngineFactory::createBeRoFactory(HandInterface* hi)
{
return new ClientBeRoFactory();
return new ClientBeRoFactory(hi);
}
@@ -28,7 +28,7 @@
#include <flopinterface.h>
#include <turninterface.h>
#include <riverinterface.h>
#include <berointerface.h>
// #include <berointerface.h>
#include <berofactoryinterface.h>
@@ -47,8 +47,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();
BeRoFactoryInterface* createBeRoFactory();
// BeRoInterface* createBeRo();
BeRoFactoryInterface* createBeRoFactory(HandInterface* hi);
};
+2 -2
View File
@@ -84,10 +84,10 @@ ClientHand::getBoard() const
return myBoard;
}
PreflopInterface*
BeRoInterface*
ClientHand::getPreflop() const
{
return myPreflop;
return myBeRo;
}
FlopInterface*
+3 -1
View File
@@ -28,6 +28,7 @@
#include <flopinterface.h>
#include <turninterface.h>
#include <riverinterface.h>
#include <berointerface.h>
#include <boost/thread.hpp>
@@ -41,7 +42,7 @@ public:
PlayerInterface** getPlayerArray() const;
BoardInterface* getBoard() const;
PreflopInterface* getPreflop() const;
BeRoInterface* getPreflop() const;
FlopInterface* getFlop() const;
TurnInterface* getTurn() const;
RiverInterface* getRiver() const;
@@ -97,6 +98,7 @@ private:
FlopInterface *myFlop;
TurnInterface *myTurn;
RiverInterface *myRiver;
BeRoInterface *myBeRo;
int myID;
int actualQuantityPlayers;