Diff
Not logged in

Differences From Artifact [dde2fe1d85562c17]:

To Artifact [57f6f73657cc3655]:


52 52 } 53 53 54 54 Tuple!(Pos, int)[] log; 55 55 bool[][] forbidden_cell; 56 56 57 57 char act(const(Game) g, string death, int breath) 58 58 { 59 - const Pos ro = g.map.robot; 60 - const Pos[] la = g.map.lambdas(); 61 - const Pos[] ra = g.map.razors(); 62 - const Pos li = g.map.lift; 63 - const Pos[] hi = g.map.objects('W'); 59 + const Pos ro = g.map.robot; 60 + const Pos li = g.map.lift; 61 + Pos[] la = g.map.lambdas(); 62 + sort!((Pos a,Pos b){ 63 + int ad=abs(a.y-li.y)+abs(a.x-li.x); 64 + int bd=abs(b.y-li.y)+abs(b.x-li.x); 65 + return ad>bd;; 66 + })(la); 67 + Pos[] ra = g.map.razors(); 68 + const(Pos)[] hi = g.map.objects('W'); 64 69 65 70 Tuple!(char,int)[] cand; 66 71 char c = 'W'; 67 72 if( la.empty ) { 68 73 cand = search(g, ro, [li], death); 69 74 } else { 70 75 cand ~= search(g, ro, la~ra, death);