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 |
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 |
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 |
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() |