Files
pokerth/src/engine/network_engine/clientbero.cpp
T

255 lines
5.8 KiB
C++
Raw Normal View History

2011-07-02 14:57:03 +00:00
/*****************************************************************************
* PokerTH - The open source texas holdem engine *
* Copyright (C) 2006-2011 Felix Hammer, Florian Thauer, Lothar May *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Affero General Public License as *
* published by the Free Software Foundation, either version 3 of the *
* License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Affero General Public License for more details. *
* *
* You should have received a copy of the GNU Affero General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
#include "clientbero.h"
2011-10-21 00:16:43 +00:00
ClientBeRo::ClientBeRo(HandInterface* hi, unsigned /*dP*/, int sB, GameState gS)
: BeRoInterface(), myBeRoID(gS), myHand(hi), highestCardsValue(0), smallBlindPositionId(0), bigBlindPositionId(0), currentPlayersTurnId(0),
firstRoundLastPlayersTurnId(0), highestSet(0), firstRound(true), smallBlindPosition(0), smallBlind(sB), minimumRaise(2*sB), fullBetRule(false),
lastActionPlayer(0)
{
}
ClientBeRo::~ClientBeRo()
{
}
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);
return highestCardsValue;
}
void
ClientBeRo::setHighestCardsValue(int theValue)
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
highestCardsValue = theValue;
}
2007-08-11 14:36:20 +00:00
void
ClientBeRo::setLastActionPlayer ( unsigned theValue )
2007-08-11 14:36:20 +00:00
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
2007-08-11 14:36:20 +00:00
lastActionPlayer = theValue;
}
unsigned
2007-08-11 14:36:20 +00:00
ClientBeRo::getLastActionPlayer() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
2007-08-11 14:36:20 +00:00
return lastActionPlayer;
}
void
ClientBeRo::setCurrentPlayersTurnIt(PlayerListIterator theValue)
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
currentPlayersTurnIt = theValue;
}
PlayerListIterator
ClientBeRo::getCurrentPlayersTurnIt() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return currentPlayersTurnIt;
}
void
ClientBeRo::setLastPlayersTurnIt(PlayerListIterator theValue)
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
lastPlayersTurnIt = theValue;
}
PlayerListIterator
ClientBeRo::getLastPlayersTurnIt() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return lastPlayersTurnIt;
}
2007-10-02 22:56:26 +00:00
void
ClientBeRo::setSmallBlindPositionId(unsigned theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
smallBlindPositionId = theValue;
}
unsigned
ClientBeRo::getSmallBlindPositionId() const
{
2011-01-12 23:35:45 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return smallBlindPositionId;
}
2007-10-02 22:56:26 +00:00
void
ClientBeRo::setBigBlindPositionId(unsigned theValue)
{
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
bigBlindPositionId = theValue;
}
unsigned
ClientBeRo::getBigBlindPositionId() const
{
2011-01-12 23:35:45 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return bigBlindPositionId;
}
void
ClientBeRo::setCurrentPlayersTurnId(unsigned theValue)
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
currentPlayersTurnId = theValue;
}
unsigned
ClientBeRo::getCurrentPlayersTurnId() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return currentPlayersTurnId;
}
void
ClientBeRo::setFirstRoundLastPlayersTurnId(unsigned theValue)
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
firstRoundLastPlayersTurnId = theValue;
}
unsigned
ClientBeRo::getFirstRoundLastPlayersTurnId() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return firstRoundLastPlayersTurnId;
}
void
ClientBeRo::setHighestSet(int theValue)
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
highestSet = theValue;
}
int
ClientBeRo::getHighestSet() const
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return highestSet;
}
void
ClientBeRo::setFirstRound(bool theValue)
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
firstRound = theValue;
}
bool
ClientBeRo::getFirstRound() const
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return firstRound;
}
void
ClientBeRo::setSmallBlindPosition(int theValue)
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
smallBlindPosition = theValue;
}
int
ClientBeRo::getSmallBlindPosition() const
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return smallBlindPosition;
}
void
ClientBeRo::setSmallBlind(int theValue)
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
smallBlind = theValue;
}
int
ClientBeRo::getSmallBlind() const
{
2007-08-07 23:59:34 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return smallBlind;
}
2007-09-02 19:20:49 +00:00
void
ClientBeRo::setMinimumRaise ( int theValue )
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
2007-09-02 19:20:49 +00:00
minimumRaise = theValue;
}
int
ClientBeRo::getMinimumRaise() const
{
2007-09-27 14:17:07 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
2007-09-02 19:20:49 +00:00
return minimumRaise;
}
2010-01-02 18:10:36 +00:00
void
ClientBeRo::setFullBetRule ( bool theValue )
{
2011-01-12 23:35:45 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
fullBetRule = theValue;
2010-01-02 18:10:36 +00:00
}
bool
ClientBeRo::getFullBetRule() const
{
2011-01-12 23:35:45 +00:00
boost::recursive_mutex::scoped_lock lock(m_syncMutex);
return fullBetRule;
2010-01-02 18:10:36 +00:00
}
2007-09-02 19:20:49 +00:00
void
2007-10-07 11:12:02 +00:00
ClientBeRo::skipFirstRunGui()
{
}
void
ClientBeRo::nextPlayer()
{
}
void
ClientBeRo::run()
{
}
void
ClientBeRo::postRiverRun()
{
}