Some header file changes.

This commit is contained in:
lotodore
2011-01-03 20:23:34 +00:00
parent 969e7822f8
commit 6952ad8a70
10 changed files with 55 additions and 50 deletions
+3 -10
View File
@@ -20,15 +20,8 @@
#ifndef BEROINTERFACE_H
#define BEROINTERFACE_H
#include <boost/shared_ptr.hpp>
#include <list>
#include <game_defs.h>
class PlayerInterface;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
#include <engine_defs.h>
class BeRoInterface{
public:
@@ -58,8 +51,8 @@ public:
virtual void setMinimumRaise (int) =0;
virtual int getMinimumRaise() const =0;
virtual void setFullBetRule (bool) =0;
virtual bool getFullBetRule() const =0;
virtual void setFullBetRule (bool) =0;
virtual bool getFullBetRule() const =0;
virtual bool getFirstRound() const =0;
+5 -12
View File
@@ -20,22 +20,15 @@
#ifndef BOARDINTERFACE_H
#define BOARDINTERFACE_H
#include <boost/shared_ptr.hpp>
#include <vector>
#include <list>
#include <engine_defs.h>
class PlayerInterface;
class HandInterface;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
typedef std::list<boost::shared_ptr<PlayerInterface> >::const_iterator PlayerListConstIterator;
class BoardInterface {
public:
virtual ~BoardInterface();
virtual ~BoardInterface();
//
virtual void setPlayerLists(PlayerList, PlayerList, PlayerList) =0;
virtual void setHand(HandInterface*) =0;
@@ -52,13 +45,13 @@ public:
virtual void collectPot() =0;
virtual void distributePot() =0;
virtual void determinePlayerNeedToShowCards() =0;
virtual void determinePlayerNeedToShowCards() =0;
virtual std::list<unsigned> getWinners() const =0;
virtual void setWinners(const std::list<unsigned> &winners) =0;
virtual std::list<unsigned> getPlayerNeedToShowCards() const =0;
virtual void setPlayerNeedToShowCards(const std::list<unsigned> &playerNeedToShowCards) =0;
virtual std::list<unsigned> getPlayerNeedToShowCards() const =0;
virtual void setPlayerNeedToShowCards(const std::list<unsigned> &playerNeedToShowCards) =0;
};
+32
View File
@@ -0,0 +1,32 @@
/***************************************************************************
* 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 ENGINE_DEFS_H
#define ENGINE_DEFS_H
#include <boost/shared_ptr.hpp>
#include <list>
class PlayerInterface;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
typedef std::list<boost::shared_ptr<PlayerInterface> >::const_iterator PlayerListConstIterator;
#endif
+2 -2
View File
@@ -39,8 +39,8 @@ public:
void setMinimumRaise ( int theValue ) { minimumRaise = theValue; }
int getMinimumRaise() const { return minimumRaise; }
void setFullBetRule ( bool theValue ) { fullBetRule = theValue; }
bool getFullBetRule() const { return fullBetRule; }
void setFullBetRule ( bool theValue ) { fullBetRule = theValue; }
bool getFullBetRule() const { return fullBetRule; }
void skipFirstRunGui() { firstRunGui = false; }
+2 -4
View File
@@ -20,10 +20,6 @@
#ifndef LOCALHAND_H
#define LOCALHAND_H
#include <vector>
#include <boost/shared_ptr.hpp>
#include <enginefactory.h>
#include <guiinterface.h>
#include <boardinterface.h>
@@ -31,6 +27,8 @@
#include <handinterface.h>
#include <berointerface.h>
#include <vector>
class Log;
class LocalHand : public HandInterface{
+4 -4
View File
@@ -18,14 +18,14 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <sqlite3.h>
#include <iostream>
#include <dirent.h>
#include <boost/lexical_cast.hpp>
#include "configfile.h"
#include "game_defs.h"
#include "log.h"
#include "playerinterface.h"
#include <sqlite3.h>
#include <iostream>
#include <dirent.h>
#include <boost/lexical_cast.hpp>
using namespace std;
+1 -8
View File
@@ -20,16 +20,9 @@
#ifndef LOG_H
#define LOG_H
#include <boost/shared_ptr.hpp>
#include <list>
#include <iostream>
#include <engine_defs.h>
struct sqlite3;
class PlayerInterface;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
typedef std::list<boost::shared_ptr<PlayerInterface> >::const_iterator PlayerListConstIterator;
class Log
{
+3 -3
View File
@@ -74,8 +74,8 @@ public:
void setMinimumRaise ( int theValue );
int getMinimumRaise() const;
void setFullBetRule ( bool theValue );
bool getFullBetRule() const;
void setFullBetRule ( bool theValue );
bool getFullBetRule() const;
void skipFirstRunGui();
@@ -110,7 +110,7 @@ private:
int smallBlind;
int minimumRaise;
bool fullBetRule;
bool fullBetRule;
int lastActionPlayer;
};
+2 -2
View File
@@ -84,8 +84,8 @@ class ClientHand : public HandInterface
void setLastPlayersTurn ( int theValue );
int getLastPlayersTurn() const;
void setLastActionPlayer ( unsigned theValue );
unsigned getLastActionPlayer() const;
void setLastActionPlayer ( unsigned theValue );
unsigned getLastActionPlayer() const;
void setCardsShown ( bool theValue );
bool getCardsShown() const;
+1 -5
View File
@@ -20,7 +20,7 @@
#ifndef GAME_H
#define GAME_H
#include <boost/shared_ptr.hpp>
#include <engine_defs.h>
#include "gamedata.h"
#include "playerdata.h"
@@ -29,15 +29,11 @@
class GuiInterface;
class Log;
class HandInterface;
class PlayerInterface;
class BoardInterface;
class EngineFactory;
struct GameData;
struct StartData;
typedef boost::shared_ptr<std::list<boost::shared_ptr<PlayerInterface> > > PlayerList;
typedef std::list<boost::shared_ptr<PlayerInterface> >::iterator PlayerListIterator;
typedef std::list<boost::shared_ptr<PlayerInterface> >::const_iterator PlayerListConstIterator;
class Game {