@@ -8,9 +8,9 @@ this(in Game g) { this.solver = new Solver(g); setup_size(g.map.W, g.map.H); - setup_resources(); + setup_resources(g); draw(g); } private void delegate(char c) fn; @@ -53,9 +53,9 @@ Color[char] colors; string[char] render; Graphics graphicContext; - void setup_resources() + void setup_resources(in Game g) { this.graphicContext = new MemoryGraphics(this.clientSize.width, this.clientSize.height); this.setStyle(ControlStyles.OPAQUE, true); this.font = new Font("MS Gothic", cell-2, GraphicsUnit.PIXEL); @@ -68,16 +68,22 @@ this.colors['\\'] = this.colors['L'] = this.colors['O'] = Color(127,255,127); this.colors['W'] = Color(204,229,255); + foreach(char c; 'A'..'J') this.colors[c] = Color(142,142,255); + foreach(char c; '1'..':') this.colors[c] = Color(255,142,255); this.render['#'] = "■"; this.render['*'] = "✹"; this.render['.'] = "♒"; this.render['\\'] = "λ"; this.render['R'] = "☃"; this.render['D'] = "☠"; this.render['L'] = "☒"; - this.render['O'] = "☐"; + foreach(c,tp; g.map.tr_target) { + char d = g.map[tp]; + this.render[c] = [cast(dchar)('㋀'+d-'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)); }; }