Differences From Artifact [05082d0f328d756c]:
- File
src/gui_main.d
- 2012-07-14 16:39:50 - part of checkin [fec7ddc502] on branch trunk - Refactoring for ease of changine main solver. (user: kinaba) [annotate]
- 2012-07-15 12:01:04 - part of checkin [a03584f1c6] on branch trunk - Refactored. (user: kinaba) [annotate]
To Artifact [4375fba2fc66f9ab]:
- File
src/gui_main.d
- 2012-07-15 13:24:12 - part of checkin [b6026abfcf] on branch trunk - Simplified GUI code. (user: kinaba) [annotate]
> 1 import util;
1 import gui; 2 import gui;
2 import output; 3 import output;
3 import driver; 4 import driver;
4 import solver; 5 import solver;
5 import std.stdio; 6 import std.stdio;
6 pragma(lib, "dfl.lib"); 7 pragma(lib, "dfl.lib");
7 8
8 void main(string[] args) | 9 void main(string[] argv)
9 { 10 {
> 11 bool automate = (argv.length>=2 && std.string.indexOf(argv[1],"auto")>=0
> 12
10 Driver d = new Driver(stdin); | 13 auto d = new Driver(stdin);
11 d.addObserver!(GuardedOutput)(); 14 d.addObserver!(GuardedOutput)();
12 auto g = d.addObserver!(GUI!MainSolver)(); | 15 d.addObserver!(GUI!MainSolver)().run(&d.command, automate);
13 g.set_fn(&d.command); <
14 g.run(); <
15 } 16 }