optimize section fw/bw by row
This commit is contained in:
@@ -72,10 +72,10 @@ class HitReturnEval:
|
||||
# | | | | | | | | | | | |
|
||||
# 1-2 1-2 1-2 1-2 1-2 1-2
|
||||
|
||||
m=0
|
||||
x0,y0,n=0,-1,0 # counter well in region
|
||||
r=0 #row
|
||||
x0,y0,n=0,-1,0 # counter well in region
|
||||
dx,dy=0,1 # motion pitch
|
||||
x1,y1=0,0 #counter region start
|
||||
x1,y1=0,0 #counter region start
|
||||
mv=list()
|
||||
while(True):
|
||||
x0+=dx;y0+=dy
|
||||
@@ -94,10 +94,12 @@ class HitReturnEval:
|
||||
dx,dy=0,1 #(4)
|
||||
elif y0==0:
|
||||
if n==1 and x0==1: #(7 or 8)
|
||||
if x1+2*sx<=nx:#(7)
|
||||
if r%2==0 and x1+2*sx<=nx:#(7 even)
|
||||
x1+=sx
|
||||
elif r%2==1 and x1>0:#(7 odd)
|
||||
x1-=sx
|
||||
elif y1+2*sy<=ny:#(8)
|
||||
x1=0;y1+=sy
|
||||
y1+=sy;r+=1
|
||||
else:
|
||||
break #finished whole grid
|
||||
print('next regionA')
|
||||
|
||||
Reference in New Issue
Block a user