33 |
* computes the score of a word, coordinates may be changed to reflect |
* computes the score of a word, coordinates may be changed to reflect |
34 |
* the real direction of the word |
* the real direction of the word |
35 |
*/ |
*/ |
36 |
static void BoardSearchEvalMove(const Board &iBoard, |
static void BoardSearchEvalMove(const Board &iBoard, |
37 |
Matrix<Tile> &iTilesMx, |
Matrix<Tile> &iTilesMx, |
38 |
Matrix<int> &iPointsMx, |
Matrix<int> &iPointsMx, |
39 |
Matrix<bool> &iJokerMx, |
Matrix<bool> &iJokerMx, |
40 |
Results &iResults, Round &iWord) |
Results &iResults, Round &iWord) |
41 |
{ |
{ |
49 |
wordmul = 1; |
wordmul = 1; |
50 |
|
|
51 |
len = iWord.getWordLen(); |
len = iWord.getWordLen(); |
|
|
|
52 |
row = iWord.getRow(); |
row = iWord.getRow(); |
53 |
col = iWord.getCol(); |
col = iWord.getCol(); |
54 |
|
|
94 |
|
|
95 |
|
|
96 |
static void ExtendRight(const Board &iBoard, |
static void ExtendRight(const Board &iBoard, |
97 |
const Dictionary &iDic, |
const Dictionary iDic, |
98 |
Matrix<Tile> &iTilesMx, |
Matrix<Tile> &iTilesMx, |
99 |
Matrix<Cross> &iCrossMx, |
Matrix<Cross> &iCrossMx, |
100 |
Matrix<int> &iPointsMx, |
Matrix<int> &iPointsMx, |
253 |
} |
} |
254 |
|
|
255 |
|
|
256 |
void Board::search(const Dictionary &iDic, |
void Board::search(const Dictionary iDic, |
257 |
const Rack &iRack, |
const Rack &iRack, |
258 |
Results &oResults) |
Results &oResults) |
259 |
{ |
{ |
267 |
BoardSearchAux(*this, iDic, m_tilesCol, m_crossCol, |
BoardSearchAux(*this, iDic, m_tilesCol, m_crossCol, |
268 |
m_pointCol, m_jokerCol, |
m_pointCol, m_jokerCol, |
269 |
copyRack, oResults, VERTICAL); |
copyRack, oResults, VERTICAL); |
|
oResults.sort(); |
|
270 |
} |
} |
271 |
|
|
272 |
|
|
273 |
void Board::searchFirst(const Dictionary &iDic, |
void Board::searchFirst(const Dictionary iDic, |
274 |
const Rack &iRack, |
const Rack &iRack, |
275 |
Results &oResults) |
Results &oResults) |
276 |
{ |
{ |
287 |
m_pointRow, m_jokerRow, |
m_pointRow, m_jokerRow, |
288 |
copyRack, partialword, oResults, Dic_root(iDic), row, col, |
copyRack, partialword, oResults, Dic_root(iDic), row, col, |
289 |
copyRack.nTiles() - 1); |
copyRack.nTiles() - 1); |
|
oResults.sort(); |
|
290 |
} |
} |