Removed dependencies on old preflop/flop/turn/river interface from networking. Compiles, but networking is BROKEN. Also includes first try of computer players for networking, which is broken, too.
This commit is contained in:
@@ -25,7 +25,7 @@ public:
|
||||
|
||||
int getMyBeRoID() const { return myBeRoID; }
|
||||
|
||||
int getHighestCardsValue() const {}
|
||||
int getHighestCardsValue() const {return 0;}
|
||||
void setHighestCardsValue(int theValue) {}
|
||||
|
||||
void run() {}
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
//
|
||||
#include "localberofactory.h"
|
||||
|
||||
#include <localberopreflop.h>
|
||||
#include <localberoflop.h>
|
||||
#include <localberoturn.h>
|
||||
#include <localberoriver.h>
|
||||
#include <localberopostriver.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
LocalBeRoFactory::LocalBeRoFactory (HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
|
||||
@@ -21,11 +21,6 @@
|
||||
#include <berofactoryinterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <handinterface.h>
|
||||
#include <localberopreflop.h>
|
||||
#include <localberoflop.h>
|
||||
#include <localberoturn.h>
|
||||
#include <localberoriver.h>
|
||||
#include <localberopostriver.h>
|
||||
|
||||
/**
|
||||
@author FThauer FHammer <webmaster@pokerth.net>
|
||||
|
||||
@@ -10,10 +10,13 @@
|
||||
//
|
||||
//
|
||||
#include "clientberofactory.h"
|
||||
#include "berointerface.h"
|
||||
#include <clientpreflop.h>
|
||||
#include <clientflop.h>
|
||||
#include <clientturn.h>
|
||||
#include <clientriver.h>
|
||||
|
||||
ClientBeRoFactory::ClientBeRoFactory(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
: BeRoFactoryInterface()
|
||||
: myHand(hi), myID(id), actualQuantityPlayers(aP), dealerPosition(dP), smallBlind(sB)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -24,14 +27,19 @@ ClientBeRoFactory::~ClientBeRoFactory()
|
||||
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > ClientBeRoFactory::createBeRo()
|
||||
{
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > bettingRounds;
|
||||
// bettingRounds.push_back(boost::shared_ptr<BeRoInterface>(new
|
||||
// LocalBeRoPreflop(...)));
|
||||
// bettingRounds.push_back(boost::shared_ptr<BeRoInterface>(new
|
||||
// LocalBeRoFlop(...)));
|
||||
//
|
||||
// ...
|
||||
return bettingRounds;
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > myBeRo;
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRoPreflop(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRoFlop(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRoTurn(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||
|
||||
myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRoRiver(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||
|
||||
// myBeRo.push_back(boost::shared_ptr<BeRoInterface>(new ClientBeRoPostRiver(myHand, myID, actualQuantityPlayers, dealerPosition, smallBlind)));
|
||||
|
||||
return myBeRo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -35,6 +35,14 @@ public:
|
||||
|
||||
std::vector<boost::shared_ptr<BeRoInterface> > createBeRo();
|
||||
|
||||
private:
|
||||
|
||||
HandInterface* myHand;
|
||||
|
||||
int myID;
|
||||
int actualQuantityPlayers;
|
||||
int dealerPosition;
|
||||
int smallBlind;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -56,22 +56,22 @@ PlayerInterface* ClientEngineFactory::createPlayer(BoardInterface *b, int id, un
|
||||
|
||||
PreflopInterface* ClientEngineFactory::createPreflop(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
{
|
||||
return new ClientPreflop(hi, id, aP, dP, sB);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FlopInterface* ClientEngineFactory::createFlop(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
{
|
||||
return new ClientFlop(hi, id, aP, dP, sB);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TurnInterface* ClientEngineFactory::createTurn(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
{
|
||||
return new ClientTurn(hi, id, aP, dP, sB);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RiverInterface* ClientEngineFactory::createRiver(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
{
|
||||
return new ClientRiver(hi, id, aP, dP, sB);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
BeRoFactoryInterface* ClientEngineFactory::createBeRoFactory(HandInterface* hi, int id, int aP, int dP, int sB)
|
||||
|
||||
@@ -22,100 +22,101 @@
|
||||
|
||||
//using namespace std;
|
||||
|
||||
ClientFlop::ClientFlop(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
ClientBeRoFlop::ClientBeRoFlop(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
: myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstFlopRun(1), firstFlopRound(1), playersTurn(dP)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
ClientFlop::~ClientFlop()
|
||||
ClientBeRoFlop::~ClientBeRoFlop()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ClientBeRoFlop::getMyBeRoID() const
|
||||
{
|
||||
return GAME_STATE_FLOP;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::setPlayersTurn(int theValue)
|
||||
ClientBeRoFlop::setPlayersTurn(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playersTurn = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientFlop::getPlayersTurn() const
|
||||
ClientBeRoFlop::getPlayersTurn() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return playersTurn;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::setHighestSet(int theValue)
|
||||
ClientBeRoFlop::setHighestSet(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
highestSet = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientFlop::getHighestSet() const
|
||||
ClientBeRoFlop::getHighestSet() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return highestSet;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::setFirstFlopRound(bool theValue)
|
||||
ClientBeRoFlop::setFirstFlopRound(bool theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstFlopRound = theValue;
|
||||
}
|
||||
|
||||
bool
|
||||
ClientFlop::getFirstFlopRound() const
|
||||
ClientBeRoFlop::getFirstFlopRound() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return firstFlopRound;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::setSmallBlindPosition(int theValue)
|
||||
ClientBeRoFlop::setSmallBlindPosition(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlindPosition = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientFlop::getSmallBlindPosition() const
|
||||
ClientBeRoFlop::getSmallBlindPosition() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlindPosition;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::setSmallBlind(int theValue)
|
||||
ClientBeRoFlop::setSmallBlind(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlind = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientFlop::getSmallBlind() const
|
||||
ClientBeRoFlop::getSmallBlind() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlind;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::resetFirstRun()
|
||||
ClientBeRoFlop::resetFirstRun()
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstFlopRun = false;
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::flopRun()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientFlop::nextPlayer2()
|
||||
ClientBeRoFlop::run()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -19,17 +19,18 @@
|
||||
#ifndef CLIENTFLOP_H
|
||||
#define CLIENTFLOP_H
|
||||
|
||||
#include "flopinterface.h"
|
||||
#include "berointerface.h"
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
class HandInterface;
|
||||
|
||||
class ClientFlop : public FlopInterface
|
||||
class ClientBeRoFlop : public BeRoInterface
|
||||
{
|
||||
public:
|
||||
ClientFlop(HandInterface*, int, int, int, int);
|
||||
~ClientFlop();
|
||||
ClientBeRoFlop(HandInterface*, int, int, int, int);
|
||||
~ClientBeRoFlop();
|
||||
|
||||
int getMyBeRoID() const;
|
||||
|
||||
void setPlayersTurn(int theValue);
|
||||
int getPlayersTurn() const;
|
||||
@@ -46,10 +47,20 @@ public:
|
||||
void setSmallBlind(int theValue);
|
||||
int getSmallBlind() const;
|
||||
|
||||
void setHighestCardsValue(int theValue) {}
|
||||
int getHighestCardsValue() const {return 0;}
|
||||
|
||||
void resetFirstRun();
|
||||
|
||||
void flopRun();
|
||||
void nextPlayer2();
|
||||
void run();
|
||||
|
||||
void preflopRun() {}
|
||||
void flopRun() {}
|
||||
void turnRun() {}
|
||||
void riverRun() {}
|
||||
void postRiverRun() {}
|
||||
|
||||
void nextPlayer2() {}
|
||||
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
@@ -23,52 +23,58 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
ClientPreflop::ClientPreflop(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
ClientBeRoPreflop::ClientBeRoPreflop(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
: myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), bigBlindPosition(0), smallBlind(sB), highestSet(2*sB), preflopFirstRound(1), playersTurn(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
ClientPreflop::~ClientPreflop()
|
||||
ClientBeRoPreflop::~ClientBeRoPreflop()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ClientBeRoPreflop::getMyBeRoID() const
|
||||
{
|
||||
return GAME_STATE_PREFLOP;
|
||||
}
|
||||
|
||||
void
|
||||
ClientPreflop::setPlayersTurn(int theValue)
|
||||
ClientBeRoPreflop::setPlayersTurn(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playersTurn = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientPreflop::getPlayersTurn() const
|
||||
ClientBeRoPreflop::getPlayersTurn() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return playersTurn;
|
||||
}
|
||||
|
||||
void
|
||||
ClientPreflop::setHighestSet(int theValue)
|
||||
ClientBeRoPreflop::setHighestSet(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
highestSet = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientPreflop::getHighestSet() const
|
||||
ClientBeRoPreflop::getHighestSet() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return highestSet;
|
||||
}
|
||||
|
||||
void
|
||||
ClientPreflop::preflopRun()
|
||||
ClientBeRoPreflop::resetFirstRun()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientPreflop::nextPlayer2()
|
||||
ClientBeRoPreflop::run()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -19,16 +19,18 @@
|
||||
#ifndef CLIENTPREFLOP_H
|
||||
#define CLIENTPREFLOP_H
|
||||
|
||||
#include <preflopinterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
class HandInterface;
|
||||
|
||||
class ClientPreflop : public PreflopInterface{
|
||||
class ClientBeRoPreflop : public BeRoInterface{
|
||||
|
||||
public:
|
||||
ClientPreflop(HandInterface*, int, int, int, int);
|
||||
~ClientPreflop();
|
||||
ClientBeRoPreflop(HandInterface*, int, int, int, int);
|
||||
~ClientBeRoPreflop();
|
||||
|
||||
int getMyBeRoID() const;
|
||||
|
||||
void setPlayersTurn(int theValue);
|
||||
int getPlayersTurn() const;
|
||||
@@ -36,8 +38,20 @@ public:
|
||||
void setHighestSet(int theValue);
|
||||
int getHighestSet() const;
|
||||
|
||||
void preflopRun();
|
||||
void nextPlayer2();
|
||||
void setHighestCardsValue(int theValue) {}
|
||||
int getHighestCardsValue() const {return 0;}
|
||||
|
||||
void resetFirstRun();
|
||||
|
||||
void run();
|
||||
|
||||
void preflopRun() {}
|
||||
void flopRun() {}
|
||||
void turnRun() {}
|
||||
void riverRun() {}
|
||||
void postRiverRun() {}
|
||||
|
||||
void nextPlayer2() {}
|
||||
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
@@ -22,122 +22,119 @@
|
||||
|
||||
//using namespace std;
|
||||
|
||||
ClientRiver::ClientRiver(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
ClientBeRoRiver::ClientBeRoRiver(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
: myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRiverRun(1), firstRiverRound(1), playersTurn(dP), highestCardsValue(0)
|
||||
{
|
||||
}
|
||||
|
||||
ClientRiver::~ClientRiver()
|
||||
ClientBeRoRiver::~ClientBeRoRiver()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ClientBeRoRiver::getMyBeRoID() const
|
||||
{
|
||||
return GAME_STATE_RIVER;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setPlayersTurn(int theValue)
|
||||
ClientBeRoRiver::setPlayersTurn(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playersTurn = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientRiver::getPlayersTurn() const
|
||||
ClientBeRoRiver::getPlayersTurn() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return playersTurn;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setHighestSet(int theValue)
|
||||
ClientBeRoRiver::setHighestSet(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
highestSet = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientRiver::getHighestSet() const
|
||||
ClientBeRoRiver::getHighestSet() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return highestSet;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setFirstRiverRound(bool theValue)
|
||||
ClientBeRoRiver::setFirstRiverRound(bool theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstRiverRound = theValue;
|
||||
}
|
||||
|
||||
bool
|
||||
ClientRiver::getFirstRiverRound() const
|
||||
ClientBeRoRiver::getFirstRiverRound() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return firstRiverRound;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setSmallBlindPosition(int theValue)
|
||||
ClientBeRoRiver::setSmallBlindPosition(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlindPosition = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientRiver::getSmallBlindPosition() const
|
||||
ClientBeRoRiver::getSmallBlindPosition() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlindPosition;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setSmallBlind(int theValue)
|
||||
ClientBeRoRiver::setSmallBlind(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlind = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientRiver::getSmallBlind() const
|
||||
ClientBeRoRiver::getSmallBlind() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlind;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::setHighestCardsValue(int theValue)
|
||||
ClientBeRoRiver::setHighestCardsValue(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
highestCardsValue = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientRiver::getHighestCardsValue() const
|
||||
ClientBeRoRiver::getHighestCardsValue() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return highestCardsValue;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::resetFirstRun()
|
||||
ClientBeRoRiver::resetFirstRun()
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstRiverRun = false;
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::riverRun()
|
||||
ClientBeRoRiver::distributePot()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::postRiverRun()
|
||||
ClientBeRoRiver::run()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::nextPlayer2()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientRiver::distributePot()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -19,16 +19,18 @@
|
||||
#ifndef CLIENTRIVER_H
|
||||
#define CLIENTRIVER_H
|
||||
|
||||
#include <riverinterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
class HandInterface;
|
||||
|
||||
|
||||
class ClientRiver : public RiverInterface{
|
||||
class ClientBeRoRiver : public BeRoInterface{
|
||||
public:
|
||||
ClientRiver(HandInterface*, int, int, int, int);
|
||||
~ClientRiver();
|
||||
ClientBeRoRiver(HandInterface*, int, int, int, int);
|
||||
~ClientBeRoRiver();
|
||||
|
||||
int getMyBeRoID() const;
|
||||
|
||||
void setPlayersTurn(int theValue);
|
||||
int getPlayersTurn() const;
|
||||
@@ -50,11 +52,18 @@ public:
|
||||
|
||||
void resetFirstRun();
|
||||
|
||||
void riverRun();
|
||||
void postRiverRun();
|
||||
void nextPlayer2();
|
||||
void distributePot();
|
||||
|
||||
|
||||
void run();
|
||||
|
||||
void preflopRun() {}
|
||||
void flopRun() {}
|
||||
void turnRun() {}
|
||||
void riverRun() {}
|
||||
void postRiverRun() {}
|
||||
|
||||
void nextPlayer2() {}
|
||||
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
|
||||
@@ -22,99 +22,100 @@
|
||||
|
||||
//using namespace std;
|
||||
|
||||
ClientTurn::ClientTurn(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
ClientBeRoTurn::ClientBeRoTurn(HandInterface* bR, int id, int qP, int dP, int sB)
|
||||
: myHand(bR), myID(id), actualQuantityPlayers(qP), dealerPosition(dP), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstTurnRun(1), firstTurnRound(1), playersTurn(dP)
|
||||
{
|
||||
}
|
||||
|
||||
ClientTurn::~ClientTurn()
|
||||
ClientBeRoTurn::~ClientBeRoTurn()
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
ClientBeRoTurn::getMyBeRoID() const
|
||||
{
|
||||
return GAME_STATE_TURN;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::setPlayersTurn(int theValue)
|
||||
ClientBeRoTurn::setPlayersTurn(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
playersTurn = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientTurn::getPlayersTurn() const
|
||||
ClientBeRoTurn::getPlayersTurn() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return playersTurn;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::setHighestSet(int theValue)
|
||||
ClientBeRoTurn::setHighestSet(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
highestSet = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientTurn::getHighestSet() const
|
||||
ClientBeRoTurn::getHighestSet() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return highestSet;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::setFirstTurnRound(bool theValue)
|
||||
ClientBeRoTurn::setFirstTurnRound(bool theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstTurnRound = theValue;
|
||||
}
|
||||
|
||||
bool
|
||||
ClientTurn::getFirstTurnRound() const
|
||||
ClientBeRoTurn::getFirstTurnRound() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return firstTurnRound;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::setSmallBlindPosition(int theValue)
|
||||
ClientBeRoTurn::setSmallBlindPosition(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlindPosition = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientTurn::getSmallBlindPosition() const
|
||||
ClientBeRoTurn::getSmallBlindPosition() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlindPosition;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::setSmallBlind(int theValue)
|
||||
ClientBeRoTurn::setSmallBlind(int theValue)
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
smallBlind = theValue;
|
||||
}
|
||||
|
||||
int
|
||||
ClientTurn::getSmallBlind() const
|
||||
ClientBeRoTurn::getSmallBlind() const
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
return smallBlind;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::resetFirstRun()
|
||||
ClientBeRoTurn::resetFirstRun()
|
||||
{
|
||||
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
||||
firstTurnRun = false;
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::turnRun()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ClientTurn::nextPlayer2()
|
||||
ClientBeRoTurn::run()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -19,15 +19,17 @@
|
||||
#ifndef CLIENTTURN_H
|
||||
#define CLIENTTURN_H
|
||||
|
||||
#include <turninterface.h>
|
||||
#include <berointerface.h>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
class HandInterface;
|
||||
|
||||
class ClientTurn : public TurnInterface{
|
||||
class ClientBeRoTurn : public BeRoInterface{
|
||||
public:
|
||||
ClientTurn(HandInterface*, int, int, int, int);
|
||||
~ClientTurn();
|
||||
ClientBeRoTurn(HandInterface*, int, int, int, int);
|
||||
~ClientBeRoTurn();
|
||||
|
||||
int getMyBeRoID() const;
|
||||
|
||||
void setPlayersTurn(int theValue);
|
||||
int getPlayersTurn() const;
|
||||
@@ -44,10 +46,20 @@ public:
|
||||
void setSmallBlind(int theValue);
|
||||
int getSmallBlind() const;
|
||||
|
||||
void setHighestCardsValue(int theValue) {}
|
||||
int getHighestCardsValue() const {return 0;}
|
||||
|
||||
void resetFirstRun();
|
||||
|
||||
void turnRun();
|
||||
void nextPlayer2();
|
||||
void run();
|
||||
|
||||
void preflopRun() {}
|
||||
void flopRun() {}
|
||||
void turnRun() {}
|
||||
void riverRun() {}
|
||||
void postRiverRun() {}
|
||||
|
||||
void nextPlayer2() {}
|
||||
|
||||
private:
|
||||
mutable boost::recursive_mutex m_syncMutex;
|
||||
|
||||
Reference in New Issue
Block a user