@@ -1,24 +1,22 @@ import util; import game; import driver; -import std.c.stdlib; import core.stdc.signal; class NilOutput : GameObserver { this(const(Game) g) {} - override bool on_game_changed(char c, const(Game) g, bool finished) {return false;} + override void on_game_changed(char c, const(Game) g, bool finished) {} } class StdOutput : GameObserver { this(const(Game) g) {} - override bool on_game_changed(char c, const(Game) g, bool finished) + override void on_game_changed(char c, const(Game) g, bool finished) { stdout.write(c); stdout.flush(); - return false; } } class GuardedOutput : GameObserver @@ -28,16 +26,15 @@ setup_sigint_handling(); ideal_log ~= g.score_if_abort_now; } - override bool on_game_changed(char c, const(Game) g, bool finished) + override void on_game_changed(char c, const(Game) g, bool finished) { log ~= c; score_log ~= g.score; ideal_log ~= g.score_if_abort_now; if(finished) flush(); - return false; } private: string log;