Changeset 225
- Timestamp:
- 02/24/07 21:33:27 (1 year ago)
- Files:
-
- 06/libkombilo/abstractboard.cpp (modified) (2 diffs)
- 06/libkombilo/search.cpp (modified) (8 diffs)
- 06/libkombilo/search.h (modified) (3 diffs)
- 06/libkombilo/sgfparser.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
06/libkombilo/abstractboard.cpp
r212 r225 34 34 } 35 35 36 // coordinates used here: (1,1)-(19,19) FIXME what?36 // coordinates used here: top left = (0,0) - bottom right = (boardsize-1,boardsize-1) 37 37 MoveNC::MoveNC(char X, char Y, char COLOR) { 38 38 x = X; … … 163 163 void abstractBoard::undostack_append_pass() { 164 164 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,'-')); 166 166 if (DEBUG_ABSTRACTBOARD) printf("AB::undostack_append_pass 100\n"); 167 167 } 06/libkombilo/search.cpp
r224 r225 484 484 485 485 patternList(); 486 // {487 // for(int i=0; i<16; i++)488 // if (flipTable[i] == -1) throw PatternError(); // FIXME: remove this once flipTable works ...489 // }490 486 continuations = new Continuation[pattern.sizeX * pattern.sizeY]; 491 487 } … … 1041 1037 else if (m.color == 'W') 1042 1038 fp[m.y/2 + 10*(m.x/2)] &= ~(1 << (2*(m.x%2 + 2*(m.y%2))+1)); 1043 else printf("ouch\n"); // FIXME1044 1039 } 1045 1040 … … 1288 1283 if (removed == 'B') movelist.push_back((char)(y | REMOVE | BLACK)); 1289 1284 else if (removed == 'W') movelist.push_back((char)(y | REMOVE | WHITE)); 1290 else printf("oops\n"); // FIXME1291 1285 } 1292 1286 … … 1597 1591 } 1598 1592 1599 int endOfNode = movel[movelistIndex] & ENDOFNODE; // FIXME remove this variable?!1600 1601 1593 char x = movel[movelistIndex] & 31; 1602 1594 char y = movel[movelistIndex+1] & 31; … … 1740 1732 } 1741 1733 1742 if ( endOfNode) {1734 if (movel[movelistIndex] & ENDOFNODE) { 1743 1735 vector<MovelistCand* >::iterator candsend = cands->end(); 1744 1736 for(vector<MovelistCand* >::iterator it = cands->begin(); it != candsend; it++) { … … 2251 2243 } 2252 2244 2253 void Algo_hash_full::endOfVariation_process() {2245 void Algo_hash_full::endOfVariation_process() throw(DBError) { 2254 2246 for(vector<pair<hashtype, ExtendedMoveNumber>* >::iterator it = lfc->begin(); it != lfc->end(); it++) { 2255 2247 int rc = insert_hash((*it)->first, (*it)->second, 0); 2256 if (rc != 0) printf("ouch %d\n", rc); // FIXME2248 if (rc != 0) throw DBError(); 2257 2249 delete *it; 2258 2250 } … … 2267 2259 } 2268 2260 2269 void Algo_hash_full::endgame_process() {2261 void Algo_hash_full::endgame_process() throw(DBError) { 2270 2262 for(vector<pair<hashtype, ExtendedMoveNumber>* >::iterator it = lfc->begin(); it != lfc->end(); it++) { 2271 2263 Move* continuation = 0; 2272 2264 int rc = insert_hash((*it)->first, (*it)->second, continuation); 2273 if (rc != 0) printf("ouch %d\n", rc); // FIXME2265 if (rc != 0) throw DBError(); 2274 2266 delete *it; 2275 2267 } … … 4493 4485 } else if (s[i] == 't') { ; // allow passes, but do not record them (we handle them a little sloppily here) 4494 4486 } else { 4495 printf("Error 1\n"); // FIXME4496 4487 throw SGFError(); 4497 4488 } 06/libkombilo/search.h
r224 r225 102 102 // Pattern constructors 103 103 // 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. 105 109 106 110 Pattern(); … … 159 163 char* updateContinuations(int orientation, int x, int y, char co, bool tenuki, char winner); 160 164 char* sortContinuations(); // and give them names to be used as labels 161 // FIXME take labels in SGF file into account (~ l)!162 165 }; 163 166 … … 370 373 void pass_process(); 371 374 void branchpoint_process(); 372 void endOfVariation_process() ;373 void endgame_process() ;375 void endOfVariation_process() throw(DBError); 376 void endgame_process() throw(DBError); 374 377 void finalize_process(); 375 378 int search(PatternList& patternList, GameList& gl, SearchOptions& options, sqlite3* db); 06/libkombilo/sgfparser.cpp
r223 r225 78 78 79 79 void ExtendedMoveNumber::down() throw(SGFError) { 80 if (length==0) throw SGFError(); // FIXME use other error class?80 if (length==0) throw SGFError(); 81 81 else if (length==1) { 82 82 int* newdata = new int[3]; … … 235 235 if (SGFst) { 236 236 SGFstring = SGFst; 237 parseNode(); // FIXME delete this here?!237 // parseNode(); 238 238 } else SGFstring = ""; 239 239 posyD = 0; … … 241 241 242 242 Node::~Node() { 243 // delete data FIXME244 243 } 245 244
