/*************************************************************************** * Copyright (C) 2007 by Lothar May * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 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 General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "clientturn.h" #include #include //using namespace std; ClientTurn::ClientTurn(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() { } void ClientTurn::setPlayersTurn(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); playersTurn = theValue; } int ClientTurn::getPlayersTurn() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return playersTurn; } void ClientTurn::setHighestSet(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); highestSet = theValue; } int ClientTurn::getHighestSet() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return highestSet; } void ClientTurn::setFirstTurnRound(bool theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); firstTurnRound = theValue; } bool ClientTurn::getFirstTurnRound() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return firstTurnRound; } void ClientTurn::setSmallBlindPosition(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); smallBlindPosition = theValue; } int ClientTurn::getSmallBlindPosition() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return smallBlindPosition; } void ClientTurn::setSmallBlind(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); smallBlind = theValue; } int ClientTurn::getSmallBlind() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return smallBlind; } void ClientTurn::resetFirstRun() { boost::recursive_mutex::scoped_lock lock(m_syncMutex); firstTurnRun = false; } void ClientTurn::turnRun() { } void ClientTurn::nextPlayer2() { }