Artifact f6cab5c23c5cba1e0f0d9394edd0e0bf650c3022
- File
src/main.d
- 2012-07-15 13:27:45 - part of checkin [3014ab5a8a] on branch trunk - Clean up. (user: kinaba) [annotate]
import util; import game; import output; import driver; import solver; class CUI(Solver) : GameObserver { this(in Game g) { solver = new Solver(g); } Solver solver; bool fin; override void on_game_changed(char c, in Game g, bool finished) { fin = finished; } } void main() { auto d = new Driver(stdin); d.addObserver!(GuardedOutput)(); auto c = d.addObserver!(CUI!MainSolver)(); while(!c.fin) d.command(c.solver.single_step()); }