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 PLAYERINTERFACE_H
|
2007-01-13 02:40:33 +00:00
|
|
|
#define PLAYERINTERFACE_H
|
|
|
|
|
|
2007-01-14 12:40:30 +00:00
|
|
|
#include "handinterface.h"
|
2007-05-08 06:45:46 +00:00
|
|
|
#include <playerdata.h>
|
2007-01-14 12:40:30 +00:00
|
|
|
|
2007-05-13 22:25:59 +00:00
|
|
|
class SessionData;
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
class PlayerInterface
|
|
|
|
|
{
|
2007-01-13 02:40:33 +00:00
|
|
|
public:
|
|
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual ~PlayerInterface() =0;
|
|
|
|
|
|
2011-01-09 14:16:20 +00:00
|
|
|
virtual void setHand(HandInterface *) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
|
|
|
|
virtual int getMyID() const =0;
|
2011-09-28 20:20:08 +00:00
|
|
|
virtual void setMyUniqueID(unsigned newId) =0;
|
2007-05-08 06:45:46 +00:00
|
|
|
virtual unsigned getMyUniqueID() const =0;
|
2011-08-28 17:14:03 +00:00
|
|
|
|
|
|
|
|
virtual void setMyGuid(const std::string &theValue) =0;
|
|
|
|
|
virtual std::string getMyGuid() const =0;
|
|
|
|
|
|
2007-05-08 06:45:46 +00:00
|
|
|
virtual PlayerType getMyType() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyDude(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyDude() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyDude4(int theValue) =0;
|
2007-04-03 10:55:16 +00:00
|
|
|
virtual int getMyDude4() const =0;
|
|
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual void setMyName(const std::string& theValue) =0;
|
|
|
|
|
virtual std::string getMyName() const =0;
|
|
|
|
|
|
2007-03-29 00:15:43 +00:00
|
|
|
virtual void setMyAvatar(const std::string& theValue) =0;
|
|
|
|
|
virtual std::string getMyAvatar() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyCash(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyCash() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMySet(int theValue) =0;
|
|
|
|
|
virtual void setMySetAbsolute(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual void setMySetNull() =0;
|
|
|
|
|
virtual int getMySet() const =0;
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual int getMyLastRelativeSet() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2011-10-26 22:29:47 +00:00
|
|
|
virtual void setMyAction(PlayerAction theValue, bool blind=0) =0;
|
|
|
|
|
virtual PlayerAction getMyAction() const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyButton(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyButton() const =0;
|
|
|
|
|
|
|
|
|
|
virtual void setMyActiveStatus(bool theValue) =0;
|
|
|
|
|
virtual bool getMyActiveStatus() const =0;
|
|
|
|
|
|
2011-02-11 20:02:08 +00:00
|
|
|
virtual void setMyStayOnTableStatus(bool theValue) =0;
|
|
|
|
|
virtual bool getMyStayOnTableStatus() const =0;
|
2009-04-22 22:32:45 +00:00
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual void setMyCards(int* theValue) =0;
|
2007-06-11 17:48:22 +00:00
|
|
|
virtual void getMyCards(int* theValue) const =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
|
|
|
|
|
virtual void setMyTurn(bool theValue) =0;
|
|
|
|
|
virtual bool getMyTurn() const =0;
|
|
|
|
|
|
2007-05-29 13:15:58 +00:00
|
|
|
virtual void setMyCardsFlip(bool theValue, int state) =0;
|
2007-02-28 20:51:43 +00:00
|
|
|
virtual bool getMyCardsFlip() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyCardsValueInt(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyCardsValueInt() const =0;
|
|
|
|
|
|
2011-11-13 01:05:28 +00:00
|
|
|
virtual void setLogHoleCardsDone(bool theValue) =0;
|
|
|
|
|
virtual bool getLogHoleCardsDone() const =0;
|
|
|
|
|
|
2007-09-06 19:09:05 +00:00
|
|
|
virtual void setMyBestHandPosition(int* theValue) =0;
|
|
|
|
|
virtual void getMyBestHandPosition(int* theValue) const =0;
|
2007-01-28 00:17:49 +00:00
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyRoundStartCash(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyRoundStartCash() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyAverageSets(int theValue) =0;
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual int getMyAverageSets() const =0;
|
2007-03-28 17:44:22 +00:00
|
|
|
|
2007-10-29 22:26:50 +00:00
|
|
|
virtual void setLastMoneyWon ( int theValue ) =0;
|
|
|
|
|
virtual int getLastMoneyWon() const =0;
|
|
|
|
|
|
2007-05-24 20:26:23 +00:00
|
|
|
virtual void setMyAggressive(bool theValue) =0;
|
2007-03-28 17:44:22 +00:00
|
|
|
virtual int getMyAggressive() const =0;
|
2007-03-30 12:44:16 +00:00
|
|
|
|
|
|
|
|
virtual void setSBluff ( int theValue ) =0;
|
|
|
|
|
virtual int getSBluff() const =0;
|
2007-03-30 13:03:04 +00:00
|
|
|
|
|
|
|
|
virtual void setSBluffStatus ( bool theValue ) =0;
|
|
|
|
|
virtual bool getSBluffStatus() const =0;
|
2007-05-29 13:15:58 +00:00
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual void action() =0;
|
2007-10-10 22:21:24 +00:00
|
|
|
virtual int checkMyAction(int targetAction, int targetBet, int highestSet, int minimumRaise, int smallBlind) = 0;
|
|
|
|
|
|
2007-01-13 22:29:17 +00:00
|
|
|
virtual void preflopEngine() =0;
|
|
|
|
|
virtual void flopEngine() =0;
|
|
|
|
|
virtual void turnEngine() =0;
|
|
|
|
|
virtual void riverEngine() =0;
|
2007-01-13 02:40:33 +00:00
|
|
|
|
2011-03-10 19:26:04 +00:00
|
|
|
virtual void setIsConnected(bool connected) =0;
|
|
|
|
|
virtual bool isConnected() const=0;
|
2011-11-13 14:28:54 +00:00
|
|
|
virtual void setIsKicked(bool kicked) =0;
|
|
|
|
|
virtual bool isKicked() const=0;
|
2010-07-16 09:13:43 +00:00
|
|
|
|
2010-09-05 14:33:34 +00:00
|
|
|
virtual bool checkIfINeedToShowCards() =0;
|
2007-01-13 02:40:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|