PlayedRack Class Reference

#include <pldrack.h>


Detailed Description

A Playedrack is an "improved" rack, allowing to differentiate new letters from letters that are left from the previous rack.

This is useful, to be able to write a rack on the form ABC+DEFG, where A, B, C are the "old" letters and D, E, F, G are the "new" ones.

Definition at line 46 of file pldrack.h.

Public Types

enum  display_mode { RACK_SIMPLE, RACK_EXTRA, RACK_DEBUG }

Public Member Functions

 PlayedRack ()
virtual ~PlayedRack ()
void reset ()
void resetNew ()
void getOld (Rack &oRack) const
void getNew (Rack &oRack) const
void getRack (Rack &oRack) const
void setOld (const Rack &iRack)
void setNew (const Rack &iRack)
int nTiles () const
int nNew () const
int nOld () const
void addNew (const Tile &t)
void addOld (const Tile &t)
void getNewTiles (vector< Tile > &oTiles) const
void getOldTiles (vector< Tile > &oTiles) const
void getAllTiles (vector< Tile > &oTiles) const
bool checkRack (int iMin) const
void operator= (const PlayedRack &iOther)
string toString (display_mode iShowExtraSigns=RACK_EXTRA) const


Member Enumeration Documentation

enum PlayedRack::display_mode
 

Enumerator:
RACK_SIMPLE 
RACK_EXTRA 
RACK_DEBUG 

Definition at line 76 of file pldrack.h.


Constructor & Destructor Documentation

PlayedRack::PlayedRack  ) 
 

Definition at line 34 of file pldrack.cpp.

virtual PlayedRack::~PlayedRack  )  [inline, virtual]
 

Definition at line 50 of file pldrack.h.


Member Function Documentation

void PlayedRack::addNew const Tile t  ) 
 

Definition at line 45 of file pldrack.cpp.

Referenced by Game::gameLoadFormat_15(), and setNew().

void PlayedRack::addOld const Tile t  ) 
 

Definition at line 39 of file pldrack.cpp.

Referenced by Game::gameLoadFormat_15(), Game::helperSetRackManual(), and setOld().

bool PlayedRack::checkRack int  iMin  )  const
 

Definition at line 151 of file pldrack.cpp.

void PlayedRack::getAllTiles vector< Tile > &  oTiles  )  const
 

Definition at line 67 of file pldrack.cpp.

References nNew(), and nOld().

Referenced by Game::helperPlayRound(), and Game::realBag().

void PlayedRack::getNew Rack oRack  )  const
 

Definition at line 101 of file pldrack.cpp.

References Rack::add(), and Rack::clear().

void PlayedRack::getNewTiles vector< Tile > &  oTiles  )  const
 

Definition at line 59 of file pldrack.cpp.

References nNew().

Referenced by Game::helperSetRackRandom().

void PlayedRack::getOld Rack oRack  )  const
 

Definition at line 90 of file pldrack.cpp.

References Rack::add(), and Rack::clear().

Referenced by getRack().

void PlayedRack::getOldTiles vector< Tile > &  oTiles  )  const
 

Definition at line 51 of file pldrack.cpp.

References nOld().

void PlayedRack::getRack Rack oRack  )  const
 

Definition at line 112 of file pldrack.cpp.

References Rack::add(), and getOld().

Referenced by AIPercent::compute(), and History::playRound().

int PlayedRack::nNew  )  const [inline]
 

Definition at line 63 of file pldrack.h.

Referenced by getAllTiles(), getNewTiles(), nTiles(), and toString().

int PlayedRack::nOld  )  const [inline]
 

Definition at line 64 of file pldrack.h.

Referenced by getAllTiles(), getOldTiles(), Game::helperSetRackRandom(), nTiles(), and toString().

int PlayedRack::nTiles  )  const [inline]
 

Definition at line 62 of file pldrack.h.

References nNew(), and nOld().

void PlayedRack::operator= const PlayedRack iOther  ) 
 

Definition at line 171 of file pldrack.cpp.

References m_newTiles, and m_oldTiles.

void PlayedRack::reset  ) 
 

Definition at line 77 of file pldrack.cpp.

Referenced by Game::helperSetRackManual().

void PlayedRack::resetNew  ) 
 

Definition at line 84 of file pldrack.cpp.

Referenced by Game::helperSetRackRandom().

void PlayedRack::setNew const Rack iRack  ) 
 

Definition at line 137 of file pldrack.cpp.

References addNew(), and Rack::getTiles().

void PlayedRack::setOld const Rack iRack  ) 
 

Definition at line 123 of file pldrack.cpp.

References addOld(), and Rack::getTiles().

Referenced by History::playRound().

string PlayedRack::toString display_mode  iShowExtraSigns = RACK_EXTRA  )  const
 

Definition at line 178 of file pldrack.cpp.

References nNew(), nOld(), RACK_EXTRA, and RACK_SIMPLE.

Referenced by Game::gameSaveFormat_14(), Game::getPlayerRack(), GfxResult::Refresh(), Plus1Frame::refresh(), and Turn::toString().


The documentation for this class was generated from the following files:
Generated on Thu Dec 29 02:01:15 2005 for Eliot by  doxygen 1.4.5