Changeset 225

Show
Ignore:
Timestamp:
02/24/07 21:33:27 (1 year ago)
Author:
ug
Message:

Fix some of the small FIXME\'s

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/libkombilo/abstractboard.cpp

    r212 r225  
    3434} 
    3535 
    36 // coordinates used here: (1,1)-(19,19) FIXME what? 
     36// coordinates used here: top left = (0,0) - bottom right = (boardsize-1,boardsize-1) 
    3737MoveNC::MoveNC(char X, char Y, char COLOR) { 
    3838  x = X; 
     
    163163void abstractBoard::undostack_append_pass() { 
    164164  if (DEBUG_ABSTRACTBOARD) printf("AB::undostack_append_pass 0\n"); 
    165   undostack.push(Move(20,20,'-')); // FIXME should be (19,19)? 
     165  undostack.push(Move(19,19,'-')); 
    166166  if (DEBUG_ABSTRACTBOARD) printf("AB::undostack_append_pass 100\n"); 
    167167} 
  • 06/libkombilo/search.cpp

    r224 r225  
    484484 
    485485  patternList(); 
    486   // { 
    487   //   for(int i=0; i<16; i++)  
    488   //     if (flipTable[i] == -1) throw PatternError(); // FIXME: remove this once flipTable works ... 
    489   // } 
    490486  continuations = new Continuation[pattern.sizeX * pattern.sizeY]; 
    491487} 
     
    10411037  else if (m.color == 'W') 
    10421038    fp[m.y/2 + 10*(m.x/2)] &= ~(1 << (2*(m.x%2 + 2*(m.y%2))+1)); 
    1043   else printf("ouch\n"); // FIXME 
    10441039} 
    10451040 
     
    12881283  if (removed == 'B') movelist.push_back((char)(y | REMOVE | BLACK)); 
    12891284  else if (removed == 'W') movelist.push_back((char)(y | REMOVE | WHITE)); 
    1290   else printf("oops\n");  // FIXME 
    12911285} 
    12921286 
     
    15971591      } 
    15981592 
    1599       int endOfNode = movel[movelistIndex] & ENDOFNODE; // FIXME remove this variable?! 
    1600  
    16011593      char x = movel[movelistIndex] & 31; 
    16021594      char y = movel[movelistIndex+1] & 31; 
     
    17401732      } 
    17411733 
    1742       if (endOfNode) { 
     1734      if (movel[movelistIndex] & ENDOFNODE) { 
    17431735        vector<MovelistCand* >::iterator candsend = cands->end(); 
    17441736        for(vector<MovelistCand* >::iterator it = cands->begin(); it != candsend; it++) { 
     
    22512243} 
    22522244 
    2253 void Algo_hash_full::endOfVariation_process()
     2245void Algo_hash_full::endOfVariation_process() throw(DBError)
    22542246  for(vector<pair<hashtype, ExtendedMoveNumber>* >::iterator it = lfc->begin(); it != lfc->end(); it++) { 
    22552247    int rc = insert_hash((*it)->first, (*it)->second, 0); 
    2256     if (rc != 0) printf("ouch %d\n", rc); // FIXME 
     2248    if (rc != 0) throw DBError(); 
    22572249    delete *it; 
    22582250  } 
     
    22672259} 
    22682260 
    2269 void Algo_hash_full::endgame_process()
     2261void Algo_hash_full::endgame_process() throw(DBError)
    22702262  for(vector<pair<hashtype, ExtendedMoveNumber>* >::iterator it = lfc->begin(); it != lfc->end(); it++) { 
    22712263    Move* continuation = 0; 
    22722264    int rc = insert_hash((*it)->first, (*it)->second, continuation); 
    2273     if (rc != 0) printf("ouch %d\n", rc); // FIXME 
     2265    if (rc != 0) throw DBError(); 
    22742266    delete *it; 
    22752267  } 
     
    44934485              } else if (s[i] == 't') { ; // allow passes, but do not record them (we handle them a little sloppily here) 
    44944486              } else { 
    4495                 printf("Error 1\n"); // FIXME 
    44964487                throw SGFError(); 
    44974488              } 
  • 06/libkombilo/search.h

    r224 r225  
    102102    // Pattern constructors 
    103103    // 
    104     // Note: the char*'s iPos and CONTLABELS will be free'ed by the Pattern class. 
     104    // the char* contLabels, if != 0, should have the same size as the pattern, and should  
     105    // contain pre-fixed label (which should be re-used when presenting the search results) 
     106    // Positions without a given label should contain '.' 
     107    // 
     108    // Note: the char*'s iPos and CONTLABELS will NOT be free'ed by the Pattern class. 
    105109 
    106110    Pattern(); 
     
    159163    char* updateContinuations(int orientation, int x, int y, char co, bool tenuki, char winner); 
    160164    char* sortContinuations(); // and give them names to be used as labels 
    161                               // FIXME take labels in SGF file into account  (~ l)! 
    162165}; 
    163166 
     
    370373    void pass_process(); 
    371374    void branchpoint_process(); 
    372     void endOfVariation_process()
    373     void endgame_process()
     375    void endOfVariation_process() throw(DBError)
     376    void endgame_process() throw(DBError)
    374377    void finalize_process(); 
    375378    int search(PatternList& patternList, GameList& gl, SearchOptions& options, sqlite3* db); 
  • 06/libkombilo/sgfparser.cpp

    r223 r225  
    7878 
    7979void ExtendedMoveNumber::down() throw(SGFError) { 
    80   if (length==0) throw SGFError(); // FIXME use other error class? 
     80  if (length==0) throw SGFError(); 
    8181  else if (length==1) { 
    8282    int* newdata = new int[3]; 
     
    235235  if (SGFst) { 
    236236    SGFstring = SGFst; 
    237     parseNode(); // FIXME delete this here?! 
     237    // parseNode(); 
    238238  } else SGFstring = ""; 
    239239  posyD = 0; 
     
    241241         
    242242Node::~Node() { 
    243   // delete data FIXME 
    244243} 
    245244