Changeset 253

Show
Ignore:
Timestamp:
06/02/07 16:04:49 (3 years ago)
Author:
ug
Message:

Fixed bug in search with wildcards.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 06/libkombilo/search.cpp

    r252 r253  
    17771777 
    17781778    while (movelistIndex < endMovelist) { 
     1779      // printf("\nnextmove %d\n", counter.total_move_num()); 
    17791780      if (counter.total_move_num() == movelimit+1) { 
    17801781        for(vector<MovelistCand* >::iterator it = cands->begin(); it != cands->end(); it++) { 
     
    18451846          if (*it == 0) continue; 
    18461847          if ((*it)->in_relevant_region(x,y)) { 
     1848            // printf("loop 1\n %c", (*it)->dictsget(x,y)); 
    18471849            if ((*it)->dictsFound) { // found, so now we have found the continuation 
     1850              // printf("found\n"); 
    18481851              char* label; 
    18491852              label = patternList.updateContinuations( 
     
    18931896              } else { 
    18941897                (*it)->dictsset(x,y,'.'); 
    1895                 (*it)->dictsNO++; 
     1898                (*it)->dictsNO++; // printf("++ A\n"); 
    18961899              } 
    18971900            } else if ((*it)->dictsget(x,y) == lower_invco) { 
     
    19041907                  continue; 
    19051908                } else (*it)->dictsDR = true; 
    1906               } else (*it)->dictsNO++; 
     1909              } else (*it)->dictsNO++; // printf("++ B\n"); 
    19071910            } else if ((*it)->dictsget(x,y) == co) { 
    19081911              // this move gives us the stone we are looking for 
    19091912              (*it)->dictsset(x,y,0); 
    1910               (*it)->dictsNO--; 
     1913              (*it)->dictsNO--; // printf("-- A\n"); 
    19111914            } 
    19121915          } 
     
    19171920          co = 'X'; 
    19181921          invco = 'O'; 
     1922          lower_invco = 'o'; 
    19191923        } else if (movel[movelistIndex+1] & WHITE) { 
    19201924          co = 'O'; 
    19211925          invco = 'X'; 
     1926          lower_invco = 'x'; 
    19221927        } 
    19231928 
    19241929        for(vector<MovelistCand* >::iterator it = cands->begin(); it != cands->end(); it++) { 
     1930          // printf("loop 2\n"); 
    19251931          if (*it == 0) continue; 
    19261932          if (!(*it)->dictsFound) { // not found yet 
     
    19531959                // since it was captured, we are once again looking for it: 
    19541960                (*it)->dictsset(x,y,co); 
    1955                 (*it)->dictsNO++; 
     1961                (*it)->dictsNO++; // printf("++ C\n"); 
    19561962              } 
    19571963              else if ((*it)->dictsget(x,y) == lower_invco) {  
    1958                 (*it)->dictsNO--; 
     1964                (*it)->dictsNO--; // printf("-- B\n"); 
    19591965              } 
    19601966              else if ((*it)->dictsget(x,y) == '.') { 
    19611967                // we are looking for an empty spot here, so this capture is helpful: 
    19621968                (*it)->dictsset(x,y,0); 
    1963                 (*it)->dictsNO--; 
     1969                (*it)->dictsNO--; // printf("-- C\n"); 
    19641970              } 
    19651971            }