[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] Changes to eliot/game/game.h [antoine-1]
From: |
eliot-dev |
Subject: |
[Eliot-dev] Changes to eliot/game/game.h [antoine-1] |
Date: |
Sun, 23 Oct 2005 16:58:55 -0400 |
Index: eliot/game/game.h
diff -u eliot/game/game.h:1.17.2.2 eliot/game/game.h:1.17.2.3
--- eliot/game/game.h:1.17.2.2 Sun Oct 23 18:38:18 2005
+++ eliot/game/game.h Sun Oct 23 20:58:20 2005
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*****************************************************************************/
-/* $Id: game.h,v 1.17.2.2 2005/10/23 18:38:18 afrab Exp $ */
-
#ifndef _GAME_H_
#define _GAME_H_
@@ -30,11 +28,14 @@
#include "bag.h"
#include "board.h"
#include "history.h"
-#include "player.h"
+#include "pldrack.h"
+
+class Coord;
+class Player;
/**
* Parent class of all the Game types.
- * It offers the common attributes (Board, Bag, etc...)
+ * It offers the common attributes (Board, Bag, etc...)
*/
class Game
{
@@ -78,23 +79,23 @@
*/
static Game* load(FILE *fin, const Dictionary iDic);
void save(std::ostream &out) const;
-
+
// Game handling
virtual int start() { return 0; }
- virtual int play(int player, const std::string iCoord, const std::string
iWord);
+ virtual int play(int player, const std::string &iCoord, const std::string
&iWord);
virtual int play(int player, const Coord &iCoord, const std::string
&iWord);
- virtual int play(int player, Round& round) = 0;
+ virtual int play(int player, Round& oRound) = 0;
virtual int back() = 0;
- virtual int back(int n);
+ int back(int n);
virtual int stop() { return 0; }
/// Testing things
int checkPlayedWord(const Coord& iCoord, const std::string &iWord, Round
&oRound);
- int checkPlayedWord(Round& iRound);
+ int checkPlayedWord(Round& oRound);
/// Setting racks
- virtual int setRack(int player, PlayedRack::set_rack_mode mode, bool
check, std::string rack = std::string(""));
-
+ int setRack(int player, PlayedRack::set_rack_mode mode, bool check, const
std::string &iRack = "");
+
/// Players
const int getNPlayers() const { return m_players.size(); }
const int getCurrentPlayerNum() const { return m_currplayer; }