Check-in [84fb0102a2]
Not logged in
Overview
SHA1 Hash:84fb0102a2f690cdc9844d5c5a8c7ffd33cea3c6
Date: 2012-07-16 15:12:21
User: kinaba
Comment:Minor parameter adjustment.
Timelines: family | ancestors | descendants | both | trunk
Diffs: redesign
Downloads: Tarball | ZIP archive
Other Links: files | file ages | manifest
Tags And Properties
Changes

Modified src/solver.d from [ec50c689624301b2] to [4eed871f814ba3b0].

336 336 337 // any empty space is my ground 337 // any empty space is my ground 338 Tuple!(char,int)[] tryB() { 338 Tuple!(char,int)[] tryB() { 339 const(Pos)[] q; 339 const(Pos)[] q; 340 foreach(p; gs) q ~= p; 340 foreach(p; gs) q ~= p; 341 bool[][] v = new bool[][](g.map.H+2, g.map.W+2); 341 bool[][] v = new bool[][](g.map.H+2, g.map.W+2); 342 foreach(p; q) v[p.y][p.x]=true; 342 foreach(p; q) v[p.y][p.x]=true; 343 for(int step=10; q.length; ++step) { | 343 for(int step=8; q.length; ++step) { 344 Pos[] q2; 344 Pos[] q2; 345 foreach(p; q) { 345 foreach(p; q) { 346 int[] yyy=[p.y-1,p.y,p.y,p.y+1]; 346 int[] yyy=[p.y-1,p.y,p.y,p.y+1]; 347 int[] xxx=[p.x,p.x-1,p.x+1,p.x]; 347 int[] xxx=[p.x,p.x-1,p.x+1,p.x]; 348 string sss="URLD"; 348 string sss="URLD"; 349 for(int i=0; i<yyy.length; ++i) { 349 for(int i=0; i<yyy.length; ++i) { 350 int y = yyy[i]; 350 int y = yyy[i]; ................................................................................................................................................................................ 697 int[4] dy=[-1,+1,0,0]; 697 int[4] dy=[-1,+1,0,0]; 698 int[4] dx=[0,0,-1,+1]; 698 int[4] dx=[0,0,-1,+1]; 699 char[] ds=['D','U','L','R']; 699 char[] ds=['D','U','L','R']; 700 for(int i=0; i<4; ++i) { 700 for(int i=0; i<4; ++i) { 701 if(g.map.robot==p && death.count(ds[i])) 701 if(g.map.robot==p && death.count(ds[i])) 702 continue; 702 continue; 703 int y=p.y+dy[i], x=p.x+dx[i]; 703 int y=p.y+dy[i], x=p.x+dx[i]; 704 if((g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x | 704 if((g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x 705 Q.push(tuple(new Pos(y,x),p), dist+1); 705 Q.push(tuple(new Pos(y,x),p), dist+1); 706 } 706 } 707 } 707 } 708 } 708 } 709 709 710 return ""; 710 return ""; 711 } 711 }