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/>. *
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2007-08-04 01:30:59 +00:00
|
|
|
#ifndef CLIENTBERO_H
|
|
|
|
|
#define CLIENTBERO_H
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
#include <boost/thread.hpp>
|
2007-08-04 11:37:26 +00:00
|
|
|
#include "berointerface.h"
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
class HandInterface;
|
2007-08-04 11:37:26 +00:00
|
|
|
|
2007-08-04 01:30:59 +00:00
|
|
|
/**
|
|
|
|
|
@author FThauer FHammer <webmaster@pokerth.net>
|
|
|
|
|
*/
|
2011-02-11 20:02:08 +00:00
|
|
|
class ClientBeRo : public BeRoInterface
|
|
|
|
|
{
|
2007-08-04 01:30:59 +00:00
|
|
|
public:
|
2011-10-21 00:16:43 +00:00
|
|
|
ClientBeRo(HandInterface* hi, unsigned dP, int sB, GameState gS);
|
2007-08-07 20:37:34 +00:00
|
|
|
~ClientBeRo();
|
2007-08-04 01:30:59 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
GameState getMyBeRoID() const;
|
2007-08-04 01:30:59 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
int getHighestCardsValue() const;
|
|
|
|
|
void setHighestCardsValue(int theValue);
|
2007-08-05 13:07:23 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
void setLastActionPlayer ( unsigned theValue );
|
|
|
|
|
unsigned getLastActionPlayer() const;
|
2007-09-25 18:00:05 +00:00
|
|
|
|
2007-10-02 22:56:26 +00:00
|
|
|
void setSmallBlindPositionId(unsigned theValue);
|
2007-09-28 00:16:11 +00:00
|
|
|
unsigned getSmallBlindPositionId() const;
|
2007-10-02 22:56:26 +00:00
|
|
|
|
|
|
|
|
void setBigBlindPositionId(unsigned theValue);
|
2007-09-28 00:16:11 +00:00
|
|
|
unsigned getBigBlindPositionId() const;
|
|
|
|
|
|
2007-09-26 22:27:05 +00:00
|
|
|
void setCurrentPlayersTurnId(unsigned theValue);
|
|
|
|
|
unsigned getCurrentPlayersTurnId() const;
|
|
|
|
|
|
|
|
|
|
void setFirstRoundLastPlayersTurnId(unsigned theValue);
|
|
|
|
|
unsigned getFirstRoundLastPlayersTurnId() const;
|
|
|
|
|
|
2007-09-25 18:00:05 +00:00
|
|
|
void setCurrentPlayersTurnIt(PlayerListIterator theValue);
|
|
|
|
|
PlayerListIterator getCurrentPlayersTurnIt() const;
|
|
|
|
|
|
|
|
|
|
void setLastPlayersTurnIt(PlayerListIterator theValue);
|
|
|
|
|
PlayerListIterator getLastPlayersTurnIt() const;
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void setHighestSet(int theValue);
|
|
|
|
|
int getHighestSet() const;
|
2007-08-06 20:35:26 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void setFirstRound(bool theValue);
|
|
|
|
|
bool getFirstRound() const;
|
2007-08-05 13:07:23 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void setSmallBlindPosition(int theValue);
|
|
|
|
|
int getSmallBlindPosition() const;
|
2007-08-05 13:07:23 +00:00
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
void setSmallBlind(int theValue);
|
|
|
|
|
int getSmallBlind() const;
|
|
|
|
|
|
2007-09-02 19:20:49 +00:00
|
|
|
void setMinimumRaise ( int theValue );
|
|
|
|
|
int getMinimumRaise() const;
|
|
|
|
|
|
2011-01-03 20:23:34 +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();
|
2007-08-07 20:37:34 +00:00
|
|
|
|
|
|
|
|
void nextPlayer();
|
|
|
|
|
void run();
|
|
|
|
|
|
2007-08-22 20:49:07 +00:00
|
|
|
void postRiverRun();
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
const GameState myBeRoID;
|
|
|
|
|
|
|
|
|
|
mutable boost::recursive_mutex m_syncMutex;
|
|
|
|
|
|
|
|
|
|
HandInterface *myHand;
|
|
|
|
|
|
|
|
|
|
int highestCardsValue;
|
2007-09-25 18:00:05 +00:00
|
|
|
|
|
|
|
|
PlayerListIterator currentPlayersTurnIt; // iterator for runningPlayerList
|
|
|
|
|
PlayerListIterator lastPlayersTurnIt; // iterator for runningPlayerList
|
|
|
|
|
|
2007-09-28 00:16:11 +00:00
|
|
|
unsigned smallBlindPositionId;
|
|
|
|
|
unsigned bigBlindPositionId;
|
|
|
|
|
|
2007-09-26 22:27:05 +00:00
|
|
|
unsigned currentPlayersTurnId;
|
|
|
|
|
unsigned firstRoundLastPlayersTurnId;
|
|
|
|
|
|
|
|
|
|
|
2007-08-07 20:37:34 +00:00
|
|
|
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;
|
2011-01-03 20:23:34 +00:00
|
|
|
bool fullBetRule;
|
2007-09-02 19:20:49 +00:00
|
|
|
|
2007-08-11 14:36:20 +00:00
|
|
|
int lastActionPlayer;
|
2007-08-04 01:30:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|