/[eliot]/eliot/game/duplicate.h
ViewVC logotype

Diff of /eliot/game/duplicate.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by ipkiss, Sun Oct 23 14:53:43 2005 UTC revision 1.9.2.1 by afrab, Sun Oct 23 17:16:24 2005 UTC
# Line 2  Line 2 
2   * Copyright (C) 2005 Eliot   * Copyright (C) 2005 Eliot
3   * Authors: Olivier Teuliere  <ipkiss@via.ecp.fr>   * Authors: Olivier Teuliere  <ipkiss@via.ecp.fr>
4   *   *
5    <<<<<<< duplicate.h
6    =======
7   * $Id$   * $Id$
8   *   *
9    >>>>>>> 1.9
10   * This program is free software; you can redistribute it and/or modify   * This program is free software; you can redistribute it and/or modify
11   * it under the terms of the GNU General Public License as published by   * it under the terms of the GNU General Public License as published by
12   * the Free Software Foundation; either version 2 of the License, or   * the Free Software Foundation; either version 2 of the License, or
# Line 19  Line 22 
22   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA   * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23   *****************************************************************************/   *****************************************************************************/
24    
25    /* $Id$ */
26    
27  #ifndef _DUPLICATE_H_  #ifndef _DUPLICATE_H_
28  #define _DUPLICATE_H_  #define _DUPLICATE_H_
29    
30  #include "game.h"  #include "game.h"
31    
 using std::string;  
   
   
32  /**  /**
33   * This class handles the logic specific to a duplicate game.   * This class handles the logic specific to a duplicate game.
34   * The trick in this mode is that the players will not necessarily play they   * The trick in this mode is that the players will not necessarily play they
# Line 53  class Duplicate: public Game Line 55  class Duplicate: public Game
55      friend class GameFactory;      friend class GameFactory;
56  public:  public:
57      virtual GameMode getMode() const { return kDUPLICATE; }      virtual GameMode getMode() const { return kDUPLICATE; }
58      virtual string getModeAsString() const { return "Duplicate"; }      virtual std::string getModeAsString() const { return "Duplicate"; }
59    
60      /*************************      /*************************
61       * Game handling       * Game handling
62       *************************/       *************************/
63      virtual int start();      virtual int play(int player, Round& round);
64      virtual int setRackRandom(int, bool, set_rack_mode);      virtual int back();
     virtual int play(const string &iCoord, const string &iWord);  
     virtual int endTurn();  
   
     int setPlayer(int);  
     // Switch to the previous human player who has not played yet  
     void prevHumanPlayer();  
     // Switch to the next human player who has not played yet  
     void nextHumanPlayer();  
65    
66  private:  private:
67      // Private constructor and destructor to force using the GameFactory class      // Private constructor and destructor to force using the GameFactory class
68      Duplicate(const Dictionary &iDic);      Duplicate(const Dictionary iDic);
69      virtual ~Duplicate();      virtual ~Duplicate();
70    
     void playRound(const Round &iRound, int n);  
     int  endTurnForReal();  
     void end();  
     void duplicateAI(int n);  
   
71      // m_hasPlayed[p] is true iff player p has played for this turn      // m_hasPlayed[p] is true iff player p has played for this turn
72      map<int, bool> m_hasPlayed;      std::map <int, bool> m_hasPlayed;
73  };  };
74    
75  #endif /* _DUPLICATE_H_ */  #endif /* _DUPLICATE_H_ */

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.9.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26