@@ -1,8 +1,9 @@ import dfl.all; import util; import game; import output; +//import solver; class GUI : Form { private { @@ -23,13 +24,12 @@ this.paint ~= &my_paint; this.keyDown ~= &my_keydown; - const MAX_SIZE = 640; this.formBorderStyle = FormBorderStyle.FIXED_DIALOG; this.maximizeBox = false; this.minimizeBox = false; - this.cell = MAX_SIZE / max(g.map.W, g.map.H); + this.cell = min(1024/g.map.W, 640/g.map.H); this.clientSize = Size(g.map.W*cell, g.map.H*cell); set_text(); // Resources @@ -95,8 +95,9 @@ case Keys.LEFT: g.command('L'); break; case Keys.RIGHT: g.command('R'); break; case Keys.W: g.command('W'); break; case Keys.A: g.command('A'); break; +// case Keys.G: solver.act(g); break; default: break; } if(g.cleared) Application.exit();