@@ -50,16 +50,17 @@ char act(const(Game) g, string death, int breath) { const Pos ro = g.map.robot; const Pos[] la = g.map.lambdas(); + const Pos[] ra = g.map.razors(); const Pos li = g.map.lift; Tuple!(char,int)[] cand; char c = 'W'; if( la.empty ) { cand = search(g, ro, [li], death); } else { - cand ~= search(g, ro, la, death); + cand ~= search(g, ro, la~ra, death); } // 'dig' mode if(cand.empty) { @@ -163,9 +164,9 @@ char c = "UDRL"[i]; if( death.count(c) == 0 ) return [tuple(c,step)]; } else if(forbidden_cell[y][x]){ - } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||i>=4) { + } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||g.map[y,x]=='!'||i>=4) { if(danger(y,x)) continue; q2 ~= new Pos(y,x); v[y][x]=true; @@ -203,9 +204,9 @@ char c = "UDRL"[i]; if( death.count(c) == 0 ) return [tuple(c,step)]; } else if(forbidden_cell[y][x]){ - } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||i>=4) { + } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||g.map[y,x]=='!'||i>=4) { q2 ~= new Pos(y,x); v[y][x]=true; } } @@ -246,9 +247,9 @@ char c = "UDRL"[i]; if( death.count(c) == 0 ) return [tuple(c,step)]; } else if(forbidden_cell[y][x]){ - } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||g.map[y,x]=='*'||i>=4) { + } else if(g.map[y,x]==' '||g.map[y,x]=='\\'||g.map[y,x]=='.'||g.map[y,x]=='*'||g.map[y,x]=='!'||i>=4) { q2 ~= new Pos(y,x); v[y][x]=true; } }