Diff
Not logged in

Differences From Artifact [508aa0ef899fe75c]:

To Artifact [4cc6400795e7a727]:


13 setup_keyhandling(); 13 setup_keyhandling(); 14 draw(g); 14 draw(g); 15 } 15 } 16 16 17 private void delegate(char c) fn; 17 private void delegate(char c) fn; 18 void set_fn(F)(F f) { this.fn = f; } 18 void set_fn(F)(F f) { this.fn = f; } 19 19 20 void run() | 20 void run(bool automate = false) 21 { 21 { > 22 if(automate) { > 23 Timer t = new Timer; > 24 t.interval = 100; > 25 t.tick ~= (Timer sender, EventArgs ea){ > 26 fn(solver.single_step()); > 27 }; > 28 t.start(); > 29 } 22 Application.run(this); 30 Application.run(this); 23 } 31 } 24 32 25 override void on_game_changed(char c, const(Game) g, bool finished) 33 override void on_game_changed(char c, const(Game) g, bool finished) 26 { 34 { 27 draw(g); 35 draw(g); 28 } 36 }