2011-07-02 23:03:18 +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/>. *
|
2011-07-03 19:45:08 +00:00
|
|
|
*****************************************************************************/
|
2011-07-03 22:27:36 +00:00
|
|
|
|
2011-07-03 19:45:08 +00:00
|
|
|
#ifndef HANDINTERFACE_H
|
2007-01-13 02:40:33 +00:00
|
|
|
#define HANDINTERFACE_H
|
|
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
#include "guiinterface.h"
|
2007-01-14 12:40:30 +00:00
|
|
|
#include "boardinterface.h"
|
|
|
|
|
#include "playerinterface.h"
|
2007-08-04 21:30:20 +00:00
|
|
|
#include "berointerface.h"
|
2011-02-25 21:21:36 +00:00
|
|
|
#include "log.h"
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
class HandInterface
|
|
|
|
|
{
|
2007-01-13 02:40:33 +00:00
|
|
|
public:
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual ~HandInterface();
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2007-05-12 22:00:59 +00:00
|
|
|
virtual void start() = 0;
|
|
|
|
|
|
2007-09-30 00:06:34 +00:00
|
|
|
virtual PlayerList getSeatsList() const =0;
|
2007-09-24 10:02:17 +00:00
|
|
|
virtual PlayerList getActivePlayerList() const =0;
|
|
|
|
|
virtual PlayerList getRunningPlayerList() const =0;
|
|
|
|
|
|
2011-01-09 14:16:20 +00:00
|
|
|
virtual boost::shared_ptr<BoardInterface> getBoard() const =0;
|
2007-08-06 20:35:26 +00:00
|
|
|
virtual boost::shared_ptr<BeRoInterface> getPreflop() const =0;
|
|
|
|
|
virtual boost::shared_ptr<BeRoInterface> getFlop() const =0;
|
|
|
|
|
virtual boost::shared_ptr<BeRoInterface> getTurn() const =0;
|
|
|
|
|
virtual boost::shared_ptr<BeRoInterface> getRiver() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual GuiInterface* getGuiInterface() const =0;
|
2007-08-06 20:35:26 +00:00
|
|
|
virtual boost::shared_ptr<BeRoInterface> getCurrentBeRo() const =0;
|
2011-02-26 10:09:45 +00:00
|
|
|
virtual Log* getLog() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setMyID(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyID() const =0;
|
2011-02-11 20:02:08 +00:00
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setStartQuantityPlayers(int theValue) =0;
|
2007-03-05 19:21:41 +00:00
|
|
|
virtual int getStartQuantityPlayers() const =0;
|
|
|
|
|
|
2007-10-18 17:40:12 +00:00
|
|
|
virtual void setCurrentRound(int theValue) =0;
|
|
|
|
|
virtual int getCurrentRound() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setDealerPosition(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getDealerPosition() const =0;
|
|
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setSmallBlind(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getSmallBlind() const =0;
|
|
|
|
|
|
|
|
|
|
virtual void setAllInCondition(bool theValue) =0;
|
|
|
|
|
virtual bool getAllInCondition() const =0;
|
|
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setStartCash(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getStartCash() const =0;
|
|
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setBettingRoundsPlayed(int theValue) =0;
|
2007-03-09 03:53:39 +00:00
|
|
|
virtual int getBettingRoundsPlayed() const =0;
|
|
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setLastPlayersTurn(int theValue) =0;
|
2007-03-29 22:58:04 +00:00
|
|
|
virtual int getLastPlayersTurn() const =0;
|
|
|
|
|
|
2011-01-09 14:16:20 +00:00
|
|
|
virtual void setLastActionPlayer( unsigned theValue ) =0;
|
|
|
|
|
virtual unsigned getLastActionPlayer() const =0;
|
2010-07-22 21:17:22 +00:00
|
|
|
|
2007-06-06 21:16:52 +00:00
|
|
|
virtual void setCardsShown(bool theValue) =0;
|
|
|
|
|
virtual bool getCardsShown() const =0;
|
|
|
|
|
|
2007-01-14 13:23:04 +00:00
|
|
|
virtual void switchRounds() =0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2011-01-12 23:35:45 +00:00
|
|
|
protected:
|
|
|
|
|
virtual PlayerListIterator getSeatIt(unsigned) const =0;
|
|
|
|
|
virtual PlayerListIterator getActivePlayerIt(unsigned) const =0;
|
|
|
|
|
virtual PlayerListIterator getRunningPlayerIt(unsigned) const =0;
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
friend class Game;
|
|
|
|
|
friend class LocalBeRo;
|
|
|
|
|
friend class LocalBeRoPreflop;
|
|
|
|
|
friend class LocalBeRoFlop;
|
|
|
|
|
friend class LocalBeRoTurn;
|
|
|
|
|
friend class LocalBeRoRiver;
|
|
|
|
|
friend class LocalBeRoPostRiver;
|
2007-01-13 02:40:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|