Differences From Artifact [cf5501d5881f7842]:
- File
src/solver.d
- 2012-07-15 15:13:15 - part of checkin [5491fa544d] on branch trunk - several fixes. (user: kinaba) [annotate]
To Artifact [e30aef925f9048ea]:
- File
src/solver.d
- 2012-07-15 15:38:46 - part of checkin [d40deaae5a] on branch trunk - Trampoline factored out. (user: kinaba) [annotate]
191 foreach(p; q) { 191 foreach(p; q) {
192 int[] yyy=[p.y-1,p.y+1,p.y,p.y]; 192 int[] yyy=[p.y-1,p.y+1,p.y,p.y];
193 int[] xxx=[p.x,p.x,p.x-1,p.x+1]; 193 int[] xxx=[p.x,p.x,p.x-1,p.x+1];
194 for(int i=0; i<yyy.length; ++i) { 194 for(int i=0; i<yyy.length; ++i) {
195 int y = yyy[i]; 195 int y = yyy[i];
196 int x = xxx[i]; 196 int x = xxx[i];
197 if('1'<=g.map[y,x]&&g.map[y,x]<= 197 if('1'<=g.map[y,x]&&g.map[y,x]<=
198 foreach(ppp; g.map.tr_so | 198 foreach(ppp; g.tr.source
199 yyy ~= ppp.y; 199 yyy ~= ppp.y;
200 xxx ~= ppp.x; 200 xxx ~= ppp.x;
201 } 201 }
202 continue; 202 continue;
203 } 203 }
204 if(v[y][x]) continue; 204 if(v[y][x]) continue;
205 if(y==s.y && x==s.x && i<4) { 205 if(y==s.y && x==s.x && i<4) {
................................................................................................................................................................................
231 foreach(p; q) { 231 foreach(p; q) {
232 int[] yyy=[p.y-1,p.y+1,p.y,p.y]; 232 int[] yyy=[p.y-1,p.y+1,p.y,p.y];
233 int[] xxx=[p.x,p.x,p.x-1,p.x+1]; 233 int[] xxx=[p.x,p.x,p.x-1,p.x+1];
234 for(int i=0; i<yyy.length; ++i) { 234 for(int i=0; i<yyy.length; ++i) {
235 int y = yyy[i]; 235 int y = yyy[i];
236 int x = xxx[i]; 236 int x = xxx[i];
237 if('1'<=g.map[y,x]&&g.map[y,x]<= 237 if('1'<=g.map[y,x]&&g.map[y,x]<=
238 foreach(ppp; g.map.tr_so | 238 foreach(ppp; g.tr.source
239 yyy ~= ppp.y; 239 yyy ~= ppp.y;
240 xxx ~= ppp.x; 240 xxx ~= ppp.x;
241 } 241 }
242 continue; 242 continue;
243 } 243 }
244 if(v[y][x]) continue; 244 if(v[y][x]) continue;
245 if(y==s.y && x==s.x && i<4) { 245 if(y==s.y && x==s.x && i<4) {
................................................................................................................................................................................
274 int x = xxx[i]; 274 int x = xxx[i];
275 if(rocky(g.map[p])) { 275 if(rocky(g.map[p])) {
276 if(i>=4)continue; 276 if(i>=4)continue;
277 if(y!=p.y)continue; 277 if(y!=p.y)continue;
278 if(g.map[y,p.x+(p.x-x)]! 278 if(g.map[y,p.x+(p.x-x)]!
279 } 279 }
280 if('1'<=g.map[y,x]&&g.map[y,x]<= 280 if('1'<=g.map[y,x]&&g.map[y,x]<=
281 foreach(ppp; g.map.tr_so | 281 foreach(ppp; g.tr.source
282 yyy ~= ppp.y; 282 yyy ~= ppp.y;
283 xxx ~= ppp.x; 283 xxx ~= ppp.x;
284 } 284 }
285 continue; 285 continue;
286 } 286 }
287 if(v[y][x]) continue; 287 if(v[y][x]) continue;
288 if(y==s.y && x==s.x && i<4) { 288 if(y==s.y && x==s.x && i<4) {