Differences From Artifact [ec50c689624301b2]:
- File
src/solver.d
- 2012-07-16 05:26:29 - part of checkin [6c02dd0cf0] on branch trunk - Minor change of BFS ordering. (user: kinaba) [annotate]
To Artifact [4eed871f814ba3b0]:
- File
src/solver.d
- 2012-07-16 06:12:21 - part of checkin [84fb0102a2] on branch trunk - Minor parameter adjustment. (user: kinaba) [annotate]
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 }