@@ -7,9 +7,9 @@ { this(in Game g) { this.solver = new Solver(g); - setup_size(g.map.W, g.map.H); + setup_size(g.W, g.H); setup_resources(g); draw(g); } @@ -82,12 +82,9 @@ this.render['L'] = "☒"; this.render['O'] = "☐"; this.render['W'] = "ꔣ"; this.render['!'] = "✄"; - foreach(c,tp; g.map.tr_target) { - char d = g.map[tp]; - this.render[c] = [cast(dchar)('☢'+d-'1')].to!string(); - } + foreach(char c; 'A'..'J') this.render[c] = [cast(dchar)('☢'+g.trampoline(c)-'1')].to!string(); foreach(char c; '1'..':') this.render[c] = [cast(dchar)('☢'+c-'1')].to!string(); this.paint ~= (Control c, PaintEventArgs ev) { graphicContext.copyTo(ev.graphics, Rect(0,0,this.clientSize.width,this.clientSize.height)); }; @@ -105,12 +102,12 @@ int w = g.water_level(); graphicContext.fillRectangle(this.colors['w'], Rect(0, scrH-cell*w-1, scrW, cell*w+1)); // Paint map. - for(int y=1; y<=g.map.H; ++y) - for(int x=1; x<=g.map.W; ++x) { + for(int y=1; y<=g.H; ++y) + for(int x=1; x<=g.W; ++x) { Rect r = Rect(cell*(x-1), scrH-cell*y, cell, cell); - char c = g.map[y,x]; + char c = g[y,x]; if( c != ' ' ) { if( c == 'R' && g.dead ) c = 'd'; graphicContext.drawText(this.render[c], font, this.colors[c], r); @@ -122,9 +119,9 @@ "Score: ", g.score, " Air: ", g.hp, " Tide: ", g.water_until_rise, " Wadler: ", g.hige_until_rise, - " Razor: ", g.map.razor); + " Razor: ", g.num_razor); invalidate(); } private: