Changeset 119

Show
Ignore:
Timestamp:
03/24/04 18:37:53 (5 years ago)
Author:
ug
Message:

Fix search in variations

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/devel/abstractBoardPY.py

    r83 r119  
    5858 
    5959    def copy(self): 
     60        print 'invoke copy' 
    6061        ab = abstractBoard(self.boardsize) 
    6162        ab.status = deepcopy(self.status) 
  • 06/devel/aglPY.py

    r101 r119  
    429429                 
    430430                newDB.process(dbpath, datap, algos, filenames, messages, 
    431                               sloppySGF, duplicateCheck, strictDuplicateCheck, self) 
     431                              sloppySGF, duplicateCheck, strictDuplicateCheck, 1) # self) FIXME 
    432432            except IOError: # FIXME 
    433433                messages.insert('Error', 
     
    492492            try: 
    493493                newDB.process(sgfpath, datap, thisAlgos, filenames, messages, 
    494                               sloppySGF, duplicateCheck, strictDuplicateCheck, self) 
     494                              sloppySGF, duplicateCheck, strictDuplicateCheck, 1) # FIXME self) 
    495495            except IOError: # FIXME 
    496496                messages.insert('end', 'Error: A fatal error occurred when processing ' + sgfpath + '.\n') 
  • 06/devel/algosPY.py

    r115 r119  
    2424from array import * 
    2525from string import lower, join 
     26from copy import deepcopy 
     27 
     28def BW2XO(c): 
     29    try: 
     30        return {'B': 'X', 'W': 'O'}[c] 
     31    except: 
     32        return c 
     33 
    2634 
    2735class Algorithm: # virtual 
     
    543551                cL = p.contList.split('/') 
    544552                for t in cL: 
    545                     if t: contList[m].append((ord(t[0])+m[1][0], ord(t[1])+m[1][1], t[2])) 
     553                    if t: contList[m].append((ord(t[0])+m[1][0], ord(t[1])+m[1][1], BW2XO(t[2]))) 
    546554 
    547555                contListIndex[m] = 0 
     
    613621 
    614622                            elif dicts[m].has_key('foundInitial'): 
     623 
     624                                print 'look at contlist', (x,y,co), contList[m][contListIndex[m]] 
     625                                 
    615626                                if (x, y, co) == contList[m][contListIndex[m]]: 
    616627                                    contListIndex[m] += 1 
     628                                    print 'ok' 
    617629                                    if contListIndex[m] == len(contList[m]): 
    618630                                        dicts[m]['found'] = counter 
     
    668680                               and Yinterv[m][0] <= y < Yinterv[m][1]: 
    669681                                if dicts[m].has_key('foundInitial'): 
     682 
     683                                    # look for captures in the contList 
     684                                    # (which may be in the wrong order) 
     685                                     
    670686                                    ii = contListIndex[m] 
    671687                                    while ii < len(contList[m]) and \ 
     
    932948                                hash_start = self.hashT[2*((start+end)/2)+1] 
    933949                                if 2*((start+end)/2)+3 >= len(self.hashT): 
    934                                     hash_end = len(hash) 
     950                                    hash_end = len(self.hashT) # FIXME: war len(hash); stimmt das jetzt? 
    935951                                else: hash_end = self.hashT[2*((start+end)/2)+3] 
    936952 
  • 06/devel/kombilo.py

    r115 r119  
    24102410            self.currentContList.append((pos[0], pos[1], color)) 
    24112411            self.board.placeMSLabel(pos, 'LB', `len(self.currentContList)`) 
     2412 
     2413        # FIXME: put captures into currentContList! 
    24122414 
    24132415        if self.oneClick.get() and (self.board.selection[1] == (-1,-1) or \ 
  • 06/devel/patternPY.py

    r115 r119  
    101101 
    102102        for t in contList.split('/'): 
    103             if t
     103            if t and t[2] in ['B', 'W']
    104104                # print ord(t[0]), ord(t[1]), t[2] 
    105                 helpFinalPos[ord(t[0]) + sizeX*ord(t[1])] = self.BW2XO(t[2]) # ignore captures ... 
     105                helpFinalPos[ord(t[0]) + sizeX*ord(t[1])] = self.BW2XO(t[2]) # FIXME: deal with captures 
    106106 
    107107        self.finalPos = join(helpFinalPos, '') 
  • 06/devel/searchPY.py

    r101 r119  
    366366                                self.branchpoints.append((cursor.currentN, b.copy(), whichVar+1)) 
    367367                            cursor.next(whichVar+1) 
    368                         else: break 
     368                        else: 
     369                            break 
    369370                         
    370371                except SGFError: 
    371372                    messages.insert('end', 'File ' + f +iColl + ': SGF error in node ' + `counter+3` + '.\n') 
    372                 except: 
     373                except ImportError: # FIXME 
    373374                    messages.insert('end', 'File ' + f + iColl + ': Error in node ' + `counter+3` + '.\n') 
    374375 
     
    434435                    siglist.append(signature) 
    435436 
    436                 except ImportError:  
     437                except ImportError: # FIXME 
    437438                    messages.insert('end', 'File ' + f +iColl + ': Error computing the Dyer signature.\n') 
    438439                    signature = '????????????'