2007-08-04 01:30:59 +00:00
|
|
|
//
|
|
|
|
|
// C++ Implementation: clientbero
|
|
|
|
|
//
|
|
|
|
|
// Description:
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Author: FThauer FHammer <webmaster@pokerth.net>, (C) 2007
|
|
|
|
|
//
|
|
|
|
|
// Copyright: See COPYING file that comes with this distribution
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
#include "clientbero.h"
|
|
|
|
|
|
2007-09-03 18:05:39 +00:00
|
|
|
ClientBeRo::ClientBeRo(HandInterface* hi, int /*id*/, int /*qP*/, int dP, int sB, GameState gS)
|
2007-09-02 19:20:49 +00:00
|
|
|
: BeRoInterface(), myHand(hi), highestCardsValue(0), myBeRoID(gS), smallBlindPosition(0), smallBlind(sB), highestSet(0), firstRound(1), playersTurn(dP), minimumRaise(0)
|
2007-08-04 01:30:59 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClientBeRo::~ClientBeRo()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
GameState
|
|
|
|
|
ClientBeRo::getMyBeRoID() const
|
|
|
|
|
{
|
|
|
|
|
return myBeRoID;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getHighestCardsValue() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return highestCardsValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::setHighestCardsValue(int theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
highestCardsValue = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-11 14:36:20 +00:00
|
|
|
void
|
|
|
|
|
ClientBeRo::setLastActionPlayer ( int theValue )
|
|
|
|
|
{
|
|
|
|
|
lastActionPlayer = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getLastActionPlayer() const
|
|
|
|
|
{
|
|
|
|
|
return lastActionPlayer;
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void
|
|
|
|
|
ClientBeRo::setPlayersTurn(int theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
playersTurn = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getPlayersTurn() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return playersTurn;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::setHighestSet(int theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
highestSet = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getHighestSet() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return highestSet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::setFirstRound(bool theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
firstRound = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
ClientBeRo::getFirstRound() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return firstRound;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::setSmallBlindPosition(int theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
smallBlindPosition = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getSmallBlindPosition() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return smallBlindPosition;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::setSmallBlind(int theValue)
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
smallBlind = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getSmallBlind() const
|
|
|
|
|
{
|
2007-08-07 23:59:34 +00:00
|
|
|
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
|
2007-08-07 20:37:34 +00:00
|
|
|
return smallBlind;
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-02 19:20:49 +00:00
|
|
|
void
|
|
|
|
|
ClientBeRo::setMinimumRaise ( int theValue )
|
|
|
|
|
{
|
|
|
|
|
minimumRaise = theValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int
|
|
|
|
|
ClientBeRo::getMinimumRaise() const
|
|
|
|
|
{
|
|
|
|
|
return minimumRaise;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void
|
|
|
|
|
ClientBeRo::resetFirstRun()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::nextPlayer()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
ClientBeRo::run()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-22 20:49:07 +00:00
|
|
|
void
|
|
|
|
|
ClientBeRo::postRiverRun()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|