Round Class Reference

#include <round.h>


Detailed Description

A Round is the representation of a played word (or going to be played).

It contains the word itself, of course, but also information of position on the board, origin of letters (board for a letter already placed, rack for a letter just being played), points, etc...

Definition at line 37 of file round.h.

Public Member Functions

 Round ()
virtual ~Round ()
void init ()
void addRightFromBoard (Tile)
void removeRightToBoard (Tile)
void addRightFromRack (Tile, bool)
void removeRightToRack (Tile, bool)
void setPoints (int iPoints)
void setBonus (bool iBonus)
void setTile (int iIndex, const Tile &iTile)
void setWord (const vector< Tile > &iTiles)
void setFromRack (int iIndex)
void setFromBoard (int iIndex)
void setJoker (int iIndex, bool value=true)
bool isJoker (int iIndex) const
bool isPlayedFromRack (int iIndex) const
const Tile & getTile (int iIndex) const
string getWord () const
int getWordLen () const
int getPoints () const
int getBonus () const
const Coord & getCoord () const
Coord & accessCoord ()
string toString () const


Constructor & Destructor Documentation

Round::Round (   ) 
 

Definition at line 31 of file round.cpp.

References init().

virtual Round::~Round (   )  [inline, virtual]
 

Definition at line 45 of file round.h.


Member Function Documentation

Coord& Round::accessCoord (   )  [inline]
 

Definition at line 83 of file round.h.

Referenced by BoardSearchAux(), BoardSearchEvalMove(), Game::checkPlayedWord(), LeftPart(), and Board::searchFirst().

void Round::addRightFromBoard (  Tile   ) 
 

Definition at line 110 of file round.cpp.

References FROMBOARD.

Referenced by Game::gameLoadFormat_15().

void Round::addRightFromRack (  Tile  ,
bool 
) 
 

Definition at line 125 of file round.cpp.

References FROMRACK, and JOKER.

Referenced by ExtendRight(), Game::gameLoadFormat_15(), and LeftPart().

int Round::getBonus (   )  const [inline]
 

Definition at line 77 of file round.h.

Referenced by searchResultLine(), and toString().

const Coord& Round::getCoord (   )  const [inline]
 

Definition at line 82 of file round.h.

Referenced by Board::addRound(), BoardSearchEvalMove(), Game::checkPlayedWord(), Board::checkRound(), LeftPart(), Board::removeRound(), searchResultLine(), Board::testRound(), and toString().

int Round::getPoints (   )  const [inline]
 

Definition at line 76 of file round.h.

Referenced by Game::back(), Game::helperPlayRound(), less_points::operator()(), Training::play(), FreeGame::play(), searchResultLine(), and toString().

const Tile & Round::getTile (  int  iIndex  )  const
 

Definition at line 92 of file round.cpp.

Referenced by Board::addRound(), Game::back(), BoardSearchEvalMove(), getWord(), Game::helperPlayRound(), History::playRound(), and Board::testRound().

string Round::getWord (   )  const
 

Definition at line 144 of file round.cpp.

References getTile(), getWordLen(), isJoker(), and Tile::toChar().

Referenced by Game::gameSaveFormat_15(), Training::getTestPlayWord(), searchResultLine(), and toString().

int Round::getWordLen (   )  const
 

Definition at line 98 of file round.cpp.

Referenced by Board::addRound(), Game::back(), BoardSearchEvalMove(), getWord(), Game::helperPlayRound(), History::playRound(), Board::removeRound(), and Board::testRound().

void Round::init (   ) 
 

Definition at line 37 of file round.cpp.

References Coord::HORIZONTAL, Coord::setCol(), Coord::setDir(), and Coord::setRow().

Referenced by BoardSearchAux(), Game::checkPlayedWord(), and Round().

bool Round::isJoker (  int  iIndex  )  const
 

Definition at line 86 of file round.cpp.

References JOKER.

Referenced by Board::addRound(), Game::back(), BoardSearchEvalMove(), getWord(), Game::helperPlayRound(), History::playRound(), and Board::testRound().

bool Round::isPlayedFromRack (  int  iIndex  )  const
 

Definition at line 104 of file round.cpp.

References FROMRACK.

Referenced by Game::back(), Game::helperPlayRound(), History::playRound(), and Board::removeRound().

void Round::removeRightToBoard (  Tile   ) 
 

Definition at line 117 of file round.cpp.

void Round::removeRightToRack (  Tile  ,
bool 
) 
 

Definition at line 137 of file round.cpp.

Referenced by ExtendRight(), and LeftPart().

void Round::setBonus (  bool  iBonus  )  [inline]
 

Definition at line 60 of file round.h.

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

void Round::setFromBoard (  int  iIndex  ) 
 

Definition at line 70 of file round.cpp.

References FROMBOARD, and FROMRACK.

void Round::setFromRack (  int  iIndex  ) 
 

Definition at line 63 of file round.cpp.

References FROMBOARD, and FROMRACK.

void Round::setJoker (  int  iIndex,
bool  value = true
) 
 

Definition at line 77 of file round.cpp.

References JOKER.

void Round::setPoints (  int  iPoints  )  [inline]
 

Definition at line 59 of file round.h.

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

void Round::setTile (  int  iIndex,
const Tile &  iTile
)  [inline]
 

Definition at line 61 of file round.h.

void Round::setWord (  const vector< Tile > &  iTiles  ) 
 

Definition at line 49 of file round.cpp.

References FROMRACK.

string Round::toString (   )  const
 

Definition at line 159 of file round.cpp.

References getBonus(), getCoord(), getPoints(), getWord(), and Coord::toString().

Referenced by Game::back(), 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