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
- branch=trunk inherited from [16f0b5784f]
- sym-trunk inherited from [16f0b5784f]
Changes
Modified src/solver.d from [ec50c689624301b2] to [4eed871f814ba3b0].
336 336 337 337 // any empty space is my ground 338 338 Tuple!(char,int)[] tryB() { 339 339 const(Pos)[] q; 340 340 foreach(p; gs) q ~= p; 341 341 bool[][] v = new bool[][](g.map.H+2, g.map.W+2); 342 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 344 Pos[] q2; 345 345 foreach(p; q) { 346 346 int[] yyy=[p.y-1,p.y,p.y,p.y+1]; 347 347 int[] xxx=[p.x,p.x-1,p.x+1,p.x]; 348 348 string sss="URLD"; 349 349 for(int i=0; i<yyy.length; ++i) { 350 350 int y = yyy[i]; ................................................................................ 697 697 int[4] dy=[-1,+1,0,0]; 698 698 int[4] dx=[0,0,-1,+1]; 699 699 char[] ds=['D','U','L','R']; 700 700 for(int i=0; i<4; ++i) { 701 701 if(g.map.robot==p && death.count(ds[i])) 702 702 continue; 703 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]=='.'||g.map[y,x]=='O')&&!V[y][x]) { 704 + if((g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||g.map[y,x]=='O'||g.map[y,x]=='!')&&!V[y][x]) { 705 705 Q.push(tuple(new Pos(y,x),p), dist+1); 706 706 } 707 707 } 708 708 } 709 709 710 710 return ""; 711 711 }