Changeset 168

Show
Ignore:
Timestamp:
09/30/04 22:16:02 (4 years ago)
Author:
ug
Message:

Adapt UIntervals search to new results list

Files:

Legend:

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

    r160 r168  
    579579                          progStart, progStart+progFirstInt*progSpan) 
    580580 
    581             intervals = 0 
     581            intervals = 1 
    582582 
    583583            # if numOfStones in pattern is large (in proportion to pattern size), use intervals 
  • 06/devel/algosPY.py

    r167 r168  
    11871187class Algo_intervals: 
    11881188    """ 
     1189    Note: with this algo, search in variations is currently not possible! 
     1190 
    11891191    moves: this is a (self.boardsize x self.boardsize) array which for 
    11901192    each point of the go board contains a list of stone 
     
    15431545                        Bint = self.getUInterv(moves, moves1, index, x+a0, y+a1, 'X')[1] 
    15441546                        Wint = self.getUInterv(moves, moves1, index, x+a0, y+a1, 'O')[1] 
    1545                         if counter in [z[0] for z in Bint.data]: co = 'W'   # !!! FIXME (cf. Algo_movelist.search) 
    1546                         elif counter in [z[0] for z in Wint.data]: co = 'B' # !!! 
     1547                        if counter in [z[0] for z in Bint.data]: co = 'W'   # !!! FIXME (cf. Algo_movelist.search) ... don't understand this anymore 
     1548                        elif counter in [z[0] for z in Wint.data]: co = 'B' # !!! but easy to check, just concerns the continuation 
    15471549                        else: raise Exception # FIXME? 
    15481550                         
     
    15551557                        numOfSwitched += switched 
    15561558                        if showColorSwap and switched: 
    1557                             result.append(str(currentUInterv.first())+label+'-'
     1559                            result.append(Hit(currentUInterv.first(), label+'-', [currentUInterv.first()])
    15581560                        else: 
    1559                             result.append(str(currentUInterv.first())+label
     1561                            result.append(Hit(currentUInterv.first(), label, [currentUInterv.first()])
    15601562 
    15611563            if result: 
    15621564                result.sort() 
    1563                 db.makeCurrentHit(join(result, ', ')
     1565                db.makeCurrentHit(result
    15641566                numOfHits = numOfHits + len(result) 
    15651567                overallSwitched += numOfSwitched