/[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.5 by ipkiss, Fri Nov 4 20:00:06 2005 UTC revision 1.6 by ipkiss, Sat Nov 5 11:01:58 2005 UTC
# Line 78  static void BoardSearchEvalMove(const Bo Line 78  static void BoardSearchEvalMove(const Bo
78      iWord.setBonus(fromrack == 7);      iWord.setBonus(fromrack == 7);
79      iWord.setPoints(pts);      iWord.setPoints(pts);
80    
81      if (iWord.getDir() == VERTICAL)      if (iWord.getDir() == Coord::VERTICAL)
82      {      {
83          iWord.setRow(col);          iWord.setRow(col);
84          iWord.setCol(row);          iWord.setCol(row);
85      }      }
86      iResults.add(iWord);      iResults.add(iWord);
87      if (iWord.getDir() == VERTICAL)      if (iWord.getDir() == Coord::VERTICAL)
88      {      {
89          iWord.setRow(row);          iWord.setRow(row);
90          iWord.setCol(col);          iWord.setCol(col);
# Line 212  static void BoardSearchAux(const Board & Line 212  static void BoardSearchAux(const Board &
212                             Matrix<Cross> &iCrossMx,                             Matrix<Cross> &iCrossMx,
213                             Matrix<int> &iPointsMx,                             Matrix<int> &iPointsMx,
214                             Matrix<bool> &iJokerMx,                             Matrix<bool> &iJokerMx,
215                             Rack &iRack, Results &iResults, Direction iDir)                             Rack &iRack, Results &iResults,
216                               Coord::Direction iDir)
217  {  {
218      int row, col, lastanchor;      int row, col, lastanchor;
219      Round partialword;      Round partialword;
# Line 261  void Board::search(const Dictionary &iDi Line 262  void Board::search(const Dictionary &iDi
262    
263      BoardSearchAux(*this, iDic, m_tilesRow, m_crossRow,      BoardSearchAux(*this, iDic, m_tilesRow, m_crossRow,
264                     m_pointRow, m_jokerRow,                     m_pointRow, m_jokerRow,
265                     copyRack, oResults, HORIZONTAL);                     copyRack, oResults, Coord::HORIZONTAL);
266    
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, Coord::VERTICAL);
270      oResults.sort();      oResults.sort();
271  }  }
272    
# Line 282  void Board::searchFirst(const Dictionary Line 283  void Board::searchFirst(const Dictionary
283    
284      partialword.setRow(row);      partialword.setRow(row);
285      partialword.setCol(col);      partialword.setCol(col);
286      partialword.setDir(HORIZONTAL);      partialword.setDir(Coord::HORIZONTAL);
287      LeftPart(*this, iDic, m_tilesRow, m_crossRow,      LeftPart(*this, iDic, m_tilesRow, m_crossRow,
288               m_pointRow, m_jokerRow,               m_pointRow, m_jokerRow,
289               copyRack, partialword, oResults, Dic_root(iDic), row, col,               copyRack, partialword, oResults, Dic_root(iDic), row, col,

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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