/[eliot]/eliot/game/board_search.cpp
ViewVC logotype

Diff of /eliot/game/board_search.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ipkiss, Sun Oct 23 14:53:43 2005 UTC revision 1.4.2.1 by afrab, Sun Oct 23 17:16:23 2005 UTC
# Line 33  Line 33 
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  {  {
# Line 49  static void BoardSearchEvalMove(const Bo Line 49  static void BoardSearchEvalMove(const Bo
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    
# Line 95  static void BoardSearchEvalMove(const Bo Line 94  static void BoardSearchEvalMove(const Bo
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,
# Line 254  static void BoardSearchAux(const Board & Line 253  static void BoardSearchAux(const Board &
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  {  {
# Line 268  void Board::search(const Dictionary &iDi Line 267  void Board::search(const Dictionary &iDi
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  {  {
# Line 289  void Board::searchFirst(const Dictionary Line 287  void Board::searchFirst(const Dictionary
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  }  }

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26