# HG changeset patch # User Henry S. Thompson # Date 1585164098 0 # Node ID 6c9e371b0325a499de7588164300e8cfde9fd901 # Parent a7a10e40b344844ef64829d84b9f5856e217c88b doesn't break, what's there is good, but stuck part-way in 10a diff -r a7a10e40b344 -r 6c9e371b0325 nono.py --- a/nono.py Tue Mar 24 18:57:33 2020 +0000 +++ b/nono.py Wed Mar 25 19:21:38 2020 +0000 @@ -78,6 +78,8 @@ wins=0 changed=0 for k,runs in enumerate(self.allRuns): + if (self.m.loop,self.cLet,pos,k)==(1,'R',7,5): + print(self.m) dprint('=====pass %s.%s.%s.%s======'%(self.m.loop,self.cLet,pos,k)) if self.onepass(self.margin0,self.marginN+1,scratch,runs.copy()): wins+=1 @@ -293,9 +295,16 @@ return False if g>0: # Block a too-small gap - dprint('m2',i-g,i) - for j in range(i+1-g,i+1): - self.newX(j,True) + if rng.step==1: + # forward + dprint('m2f',i-g,i) + for j in range(i+1-g,i+1): + self.newX(j,True) + else: + # backward + dprint('m2b',i+g,i) + for j in range(i+g-1,i-1,-1): + self.newX(j,True) return True def found0(self,i):