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

Diff of /eliot/game/game.h

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

revision 1.18 by ipkiss, Fri Nov 4 20:00:06 2005 UTC revision 1.19 by ipkiss, Fri Nov 4 23:26:03 2005 UTC
# Line 41  using namespace std; Line 41  using namespace std;
41   *************************/   *************************/
42  #define IDENT_STRING "Eliot"  #define IDENT_STRING "Eliot"
43    
 /*************************  
  * Dimensions of the board, the tiles placed on  
  * the board can be accessed via getBoardChar()  
  *************************/  
 #define BOARD_MIN 1  
 #define BOARD_MAX 15  
   
   
44  /**  /**
45   * Parent class of all the Game types.   * Parent class of all the Game types.
46   * It offers the common attributes (Board, Bag, etc...) as well as useful   * It offers the common attributes (Board, Bag, etc...) as well as useful
# Line 77  public: Line 69  public:
69          kJOKER      // Joker game          kJOKER      // Joker game
70      };      };
71    
72        const Board& getBoard() const { return m_board; }
73        const Bag&   getBag()   const { return m_bag; }
74    
75      /**      /**
76       * Accessors for the variant of the game.       * Accessors for the variant of the game.
77       * The variant can be changed during a game without any problem       * The variant can be changed during a game without any problem
# Line 109  public: Line 104  public:
104      int back(int);      int back(int);
105    
106      /*************************      /*************************
      * int coordinates have to be BOARD_MIN <= int <= BOARD_MAX  
      *  
      * getBoardChar returns an upper case letter  
      * for normal tiles and a lower case letter for jokers.  
      *  
      * getBoardCharAttr tells the attributes of the tile  
      *   0 : normal played tile  
      *   1 : joker tile  
      *   2 : test tile for preview purpose  
      * attributes can be combined with the or (|) operator  
      *************************/  
 #define ATTR_NORMAL 0  
 #define ATTR_JOKER  1  
 #define ATTR_TEST   2  
   
     char getBoardChar    (int iRow, int iCol) const;  
     int  getBoardCharAttr(int iRow, int iCol) const;  
   
     int  getBoardWordMultiplier  (int iRow, int iCol) const;  
     int  getBoardLetterMultiplier(int iRow, int iCol) const;  
   
     /*************************  
107       * Set the rack for searching       * Set the rack for searching
108       *       *
109       * The int parameter is a boolean, if this parameter       * The int parameter is a boolean, if this parameter
# Line 149  public: Line 122  public:
122      static const int RACK_SIZE;      static const int RACK_SIZE;
123      typedef enum {RACK_ALL, RACK_NEW} set_rack_mode;      typedef enum {RACK_ALL, RACK_NEW} set_rack_mode;
124    
     /*************************  
      * Get the number of tiles available in the bag.  
      * The parameter has to be  
      * 'a' <= char <= 'z' or 'A' <= char <= 'Z' or '?'  
      *************************/  
     int getNCharInBag(const Tile&) const;  
   
125      /**      /**
126       * Methods to access already played words.       * Methods to access already played words.
127       * The int parameter should be 0 <= int < getNRounds()       * The int parameter should be 0 <= int < getNRounds()

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

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