Changeset 167

Show
Ignore:
Timestamp:
09/30/04 21:11:20 (4 years ago)
Author:
ug
Message:

Make pattern search with contList stones outside selected region work.

Files:

Legend:

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

    r166 r167  
    580580                dNO = 0 
    581581                p = patternList.get(m[0]) 
    582                 p.printPattern() 
    583582                for i in range(p.sizeX): 
    584583                    for j in range(p.sizeY): 
  • 06/devel/kombilo.py

    r166 r167  
    18261826         
    18271827        for c in self.currentContList: 
    1828             cls.append(chr(c[0]-self.sel[0][0]) + chr(c[1]-self.sel[0][1]) + c[2] + '/') 
     1828            if self.sel[0][0] <= c[0] <= self.sel[1][0] and self.sel[0][1] <= c[1] <= self.sel[1][1]: 
     1829                cls.append(chr(c[0]-self.sel[0][0]) + chr(c[1]-self.sel[0][1]) + c[2] + '/') 
    18291830        contListString = join(cls, '') 
    18301831        # print 'SEARCH', join(d, '') 
  • 06/devel/patternPY.py

    r166 r167  
    108108 
    109109        for t in contList.split('/'): 
    110             if t
     110            if t and ord(t[0]) < sizeX and ord(t[1]) < sizeY
    111111                if t[2] in ['B', 'W']: 
    112112                    # print ord(t[0]), ord(t[1]), t[2] 
     
    118118        self.contList = contList 
    119119        self.lenContList = lenContList 
    120          
     120        # self.printPattern()  
    121121        self.bits = [] # list of 4 bit-patterns 
    122122