Diff
Not logged in

Differences From Artifact [508aa0ef899fe75c]:

To Artifact [4cc6400795e7a727]:


13 13 setup_keyhandling(); 14 14 draw(g); 15 15 } 16 16 17 17 private void delegate(char c) fn; 18 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 30 Application.run(this); 23 31 } 24 32 25 33 override void on_game_changed(char c, const(Game) g, bool finished) 26 34 { 27 35 draw(g); 28 36 }