From 6952ad8a704cfb88bc88e39c535a572fcd8b7cb7 Mon Sep 17 00:00:00 2001 From: lotodore Date: Mon, 3 Jan 2011 20:23:34 +0000 Subject: [PATCH] Some header file changes. --- src/engine/berointerface.h | 13 +++-------- src/engine/boardinterface.h | 17 ++++---------- src/engine/engine_defs.h | 32 ++++++++++++++++++++++++++ src/engine/local_engine/localbero.h | 4 ++-- src/engine/local_engine/localhand.h | 6 ++--- src/engine/log.cpp | 8 +++---- src/engine/log.h | 9 +------- src/engine/network_engine/clientbero.h | 6 ++--- src/engine/network_engine/clienthand.h | 4 ++-- src/game.h | 6 +---- 10 files changed, 55 insertions(+), 50 deletions(-) create mode 100644 src/engine/engine_defs.h diff --git a/src/engine/berointerface.h b/src/engine/berointerface.h index 702b37ea..42f07f0b 100644 --- a/src/engine/berointerface.h +++ b/src/engine/berointerface.h @@ -20,15 +20,8 @@ #ifndef BEROINTERFACE_H #define BEROINTERFACE_H -#include -#include - #include - -class PlayerInterface; - -typedef boost::shared_ptr > > PlayerList; -typedef std::list >::iterator PlayerListIterator; +#include 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; diff --git a/src/engine/boardinterface.h b/src/engine/boardinterface.h index 44b5d289..7db82df1 100644 --- a/src/engine/boardinterface.h +++ b/src/engine/boardinterface.h @@ -20,22 +20,15 @@ #ifndef BOARDINTERFACE_H #define BOARDINTERFACE_H -#include -#include -#include +#include -class PlayerInterface; class HandInterface; -typedef boost::shared_ptr > > PlayerList; -typedef std::list >::iterator PlayerListIterator; -typedef std::list >::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 getWinners() const =0; virtual void setWinners(const std::list &winners) =0; - virtual std::list getPlayerNeedToShowCards() const =0; - virtual void setPlayerNeedToShowCards(const std::list &playerNeedToShowCards) =0; + virtual std::list getPlayerNeedToShowCards() const =0; + virtual void setPlayerNeedToShowCards(const std::list &playerNeedToShowCards) =0; }; diff --git a/src/engine/engine_defs.h b/src/engine/engine_defs.h new file mode 100644 index 00000000..a3d2efd0 --- /dev/null +++ b/src/engine/engine_defs.h @@ -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 +#include + +class PlayerInterface; + +typedef boost::shared_ptr > > PlayerList; +typedef std::list >::iterator PlayerListIterator; +typedef std::list >::const_iterator PlayerListConstIterator; + +#endif diff --git a/src/engine/local_engine/localbero.h b/src/engine/local_engine/localbero.h index 5ae15601..a610bdfa 100644 --- a/src/engine/local_engine/localbero.h +++ b/src/engine/local_engine/localbero.h @@ -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; } diff --git a/src/engine/local_engine/localhand.h b/src/engine/local_engine/localhand.h index 2d5d628f..b5c43a58 100755 --- a/src/engine/local_engine/localhand.h +++ b/src/engine/local_engine/localhand.h @@ -20,10 +20,6 @@ #ifndef LOCALHAND_H #define LOCALHAND_H -#include - -#include - #include #include #include @@ -31,6 +27,8 @@ #include #include +#include + class Log; class LocalHand : public HandInterface{ diff --git a/src/engine/log.cpp b/src/engine/log.cpp index bf47eac1..d35a8341 100644 --- a/src/engine/log.cpp +++ b/src/engine/log.cpp @@ -18,14 +18,14 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include -#include -#include #include "configfile.h" #include "game_defs.h" #include "log.h" #include "playerinterface.h" +#include +#include +#include +#include using namespace std; diff --git a/src/engine/log.h b/src/engine/log.h index 2769fa2e..69c79747 100644 --- a/src/engine/log.h +++ b/src/engine/log.h @@ -20,16 +20,9 @@ #ifndef LOG_H #define LOG_H -#include -#include -#include +#include struct sqlite3; -class PlayerInterface; - -typedef boost::shared_ptr > > PlayerList; -typedef std::list >::iterator PlayerListIterator; -typedef std::list >::const_iterator PlayerListConstIterator; class Log { diff --git a/src/engine/network_engine/clientbero.h b/src/engine/network_engine/clientbero.h index 4256b498..799e872f 100644 --- a/src/engine/network_engine/clientbero.h +++ b/src/engine/network_engine/clientbero.h @@ -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; }; diff --git a/src/engine/network_engine/clienthand.h b/src/engine/network_engine/clienthand.h index aeab1db5..b17ea5e5 100644 --- a/src/engine/network_engine/clienthand.h +++ b/src/engine/network_engine/clienthand.h @@ -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; diff --git a/src/game.h b/src/game.h index 63f02194..b9e2fbe7 100755 --- a/src/game.h +++ b/src/game.h @@ -20,7 +20,7 @@ #ifndef GAME_H #define GAME_H -#include +#include #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 > > PlayerList; -typedef std::list >::iterator PlayerListIterator; -typedef std::list >::const_iterator PlayerListConstIterator; class Game {