#include <bag.h>
Definition at line 33 of file bag.h.
Public Member Functions | |
Bag () | |
virtual | ~Bag () |
void | init () |
void | takeTile (const Tile &iTile) |
Take a tile in the bag. | |
void | replaceTile (const Tile &iTile) |
Replace a tile into the bag. | |
unsigned int | in (const Tile &iTile) const |
Return how many tiles identical to iTile are available in the bag. | |
unsigned int | nTiles () const |
Return how many tiles/vowels/consonants are available Warning: nVowels(b) + nConsonants(b) != nTiles(b), because of the jokers and the 'Y'. | |
unsigned int | nVowels () const |
unsigned int | nConsonants () const |
Tile | selectRandom () |
Return a random available tile The tile is not taken out of the bag. | |
void | operator= (const Bag &iOther) |
void | dumpAll () const |
Print on stderr all the letters of the bag (for debugging purposes). |
|
Definition at line 28 of file bag.cpp. References init(). |
|
|
|
Print on stderr all the letters of the bag (for debugging purposes).
|
|
Return how many tiles identical to iTile are available in the bag.
Definition at line 47 of file bag.cpp. Referenced by GameIO::printNonPlayed(), Game::rackInBag(), BagFrame::Refresh(), replaceTile(), and takeTile(). |
|
Definition at line 34 of file bag.cpp. References Tile::getAllTiles(). Referenced by Bag(). |
|
|
|
Return how many tiles/vowels/consonants are available Warning: nVowels(b) + nConsonants(b) != nTiles(b), because of the jokers and the 'Y'.
|
|
|
|
Definition at line 122 of file bag.cpp. References m_ntiles, and m_tilesMap. |
|
Replace a tile into the bag.
Definition at line 94 of file bag.cpp. Referenced by Game::back(), Game::helperPlayRound(), and Game::helperSetRackRandom(). |
|
Return a random available tile The tile is not taken out of the bag.
|
|
Take a tile in the bag.
Definition at line 84 of file bag.cpp. References ASSERT, in(), and Tile::toChar(). Referenced by Game::gameLoadFormat_15(), and Game::realBag(). |