/*************************************************************************** * 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 "clientriver.h" #include //using namespace std; ClientRiver::ClientRiver(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() { } void ClientRiver::setPlayersTurn(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); playersTurn = theValue; } int ClientRiver::getPlayersTurn() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return playersTurn; } void ClientRiver::setHighestSet(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); highestSet = theValue; } int ClientRiver::getHighestSet() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return highestSet; } void ClientRiver::setFirstRiverRound(bool theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); firstRiverRound = theValue; } bool ClientRiver::getFirstRiverRound() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return firstRiverRound; } void ClientRiver::setSmallBlindPosition(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); smallBlindPosition = theValue; } int ClientRiver::getSmallBlindPosition() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return smallBlindPosition; } void ClientRiver::setSmallBlind(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); smallBlind = theValue; } int ClientRiver::getSmallBlind() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return smallBlind; } void ClientRiver::setHighestCardsValue(int theValue) { boost::recursive_mutex::scoped_lock lock(m_syncMutex); highestCardsValue = theValue; } int ClientRiver::getHighestCardsValue() const { boost::recursive_mutex::scoped_lock lock(m_syncMutex); return highestCardsValue; } void ClientRiver::resetFirstRun() { boost::recursive_mutex::scoped_lock lock(m_syncMutex); firstRiverRun = false; } void ClientRiver::riverRun() { } void ClientRiver::postRiverRun() { } void ClientRiver::nextPlayer2() { } void ClientRiver::distributePot() { }