Index: src/solver.d ================================================================== --- src/solver.d +++ src/solver.d @@ -615,11 +615,11 @@ } /// /// Solver "Wind": let your rapidity be that of the wind. /// -class 疾如風 : Solver +class 疾如風(bool UP) : Solver { Game g; this(in Game g) { this.g = g.clone(); @@ -691,13 +691,13 @@ } p=q; } } - int[4] dy=[-1,+1,0,0]; - int[4] dx=[0,0,-1,+1]; - char[] ds=['D','U','L','R']; + int[4] dy=UP ? [+1,0,0,-1] : [-1,+1,0,0]; + int[4] dx=UP ? [0,-1,+1,0] : [0,0,-1,+1]; + char[] ds=UP ? ['U','L','R','D'] : ['D','U','L','R']; for(int i=0; i<4; ++i) { if(g.map.robot==p && death.count(ds[i])) continue; int y=p.y+dy[i], x=p.x+dx[i]; 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]) { @@ -715,21 +715,17 @@ this(in Game g) { if(g.map.W*g.map.H <= 1600) sub_solver = new 侵掠如火!(徐如林)(g); else - sub_solver = new 侵掠如火!(疾如風)(g); + sub_solver = new 侵掠如火!(疾如風!(true))(g); } char single_step() { return sub_solver.single_step(); } void force(char c) { return sub_solver.force(c); } private Solver sub_solver; } -alias 侵掠如火!(疾如風) FastSolver; +alias 侵掠如火!(疾如風!(false)) FastSolver; -//alias Switcher MainSolver; -//alias 侵掠如火!(疾如風) MainSolver; -alias 侵掠如火!(徐如林) MainSolver; -//alias 疾如風 MainSolver; -//alias 徐如林 MainSolver; -//alias 不動如山 MainSolver; +alias Switcher MainSolver; +//alias 侵掠如火!(徐如林) MainSolver;