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

123 lines
3.6 KiB
C++
Raw Normal View History

2007-10-14 11:01:44 +00:00
/***************************************************************************
* Copyright (C) 2006 by FThauer FHammer *
* f.thauer@web.de *
* *
* 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. *
***************************************************************************/
#ifndef CLIENTBERO_H
#define CLIENTBERO_H
#include <boost/thread.hpp>
2007-08-04 11:37:26 +00:00
#include "berointerface.h"
class HandInterface;
2007-08-04 11:37:26 +00:00
/**
@author FThauer FHammer <webmaster@pokerth.net>
*/
2007-08-04 11:37:26 +00:00
class ClientBeRo : public BeRoInterface{
public:
ClientBeRo(HandInterface* hi, int id, unsigned dP, int sB, GameState gS);
~ClientBeRo();
GameState getMyBeRoID() const;
int getHighestCardsValue() const;
void setHighestCardsValue(int theValue);
2007-08-05 13:07:23 +00:00
2007-08-11 14:36:20 +00:00
void setLastActionPlayer ( int theValue );
int getLastActionPlayer() const;
void setPlayersTurn(int theValue);
int getPlayersTurn() const;
2007-10-02 22:56:26 +00:00
void setSmallBlindPositionId(unsigned theValue);
unsigned getSmallBlindPositionId() const;
2007-10-02 22:56:26 +00:00
void setBigBlindPositionId(unsigned theValue);
unsigned getBigBlindPositionId() const;
void setCurrentPlayersTurnId(unsigned theValue);
unsigned getCurrentPlayersTurnId() const;
void setFirstRoundLastPlayersTurnId(unsigned theValue);
unsigned getFirstRoundLastPlayersTurnId() const;
void setCurrentPlayersTurnIt(PlayerListIterator theValue);
PlayerListIterator getCurrentPlayersTurnIt() const;
void setLastPlayersTurnIt(PlayerListIterator theValue);
PlayerListIterator getLastPlayersTurnIt() const;
void setHighestSet(int theValue);
int getHighestSet() const;
void setFirstRound(bool theValue);
bool getFirstRound() const;
2007-08-05 13:07:23 +00:00
void setSmallBlindPosition(int theValue);
int getSmallBlindPosition() const;
2007-08-05 13:07:23 +00:00
void setSmallBlind(int theValue);
int getSmallBlind() const;
2007-09-02 19:20:49 +00:00
void setMinimumRaise ( int theValue );
int getMinimumRaise() const;
2010-01-02 18:10:36 +00:00
void setFullBetRule ( bool theValue );
bool getFullBetRule() const;
2007-09-02 19:20:49 +00:00
2007-10-07 11:12:02 +00:00
void skipFirstRunGui();
void nextPlayer();
void run();
void postRiverRun();
private:
const GameState myBeRoID;
mutable boost::recursive_mutex m_syncMutex;
HandInterface *myHand;
int highestCardsValue;
int playersTurn; // TODO -> delete
PlayerListIterator currentPlayersTurnIt; // iterator for runningPlayerList
PlayerListIterator lastPlayersTurnIt; // iterator for runningPlayerList
unsigned smallBlindPositionId;
unsigned bigBlindPositionId;
unsigned currentPlayersTurnId;
unsigned firstRoundLastPlayersTurnId;
int highestSet;
bool firstRound;
int smallBlindPosition;
int smallBlind;
2007-08-11 14:36:20 +00:00
2007-09-02 19:20:49 +00:00
int minimumRaise;
2010-01-02 18:10:36 +00:00
bool fullBetRule;
2007-09-02 19:20:49 +00:00
2007-08-11 14:36:20 +00:00
int lastActionPlayer;
};
#endif