Differences From Artifact [045b845268918546]:
- File        
src/output.d
- 2012-07-15 06:15:47 - part of checkin [f6c126aeeb] on branch trunk - better flushed check. (user: kinaba) [annotate]
- 2012-07-15 12:14:10 - part of checkin [e02668367d] on branch trunk - Revert redesign in the trunk. (user: kinaba) [annotate]
 
To Artifact [b301f73c74ef62f4]:
- File        
src/output.d
- 2012-07-15 11:17:59 - part of checkin [ff0ab77d3d] on branch trunk - new game class. (user: kinaba) [annotate]
 
   14          this(in Game g) {}                                                            14          this(in Game g) {}
   15          override void on_game_changed(char c, in Game g, bool finished)               15          override void on_game_changed(char c, in Game g, bool finished)
   16          {                                                                             16          {
   17                  stdout.write(c);                                                      17                  stdout.write(c);
   18                  stdout.flush();                                                       18                  stdout.flush();
   19          }                                                                             19          }
   20  }                                                                                     20  }
   21                                                                                   <
                                                                                        >    21  /*
   22  class GuardedOutput : GameObserver                                                    22  class GuardedOutput : GameObserver
   23  {                                                                                     23  {
   24          this(in Game g)                                                               24          this(in Game g)
   25          {                                                                             25          {
   26                  setup_sigint_handling();                                              26                  setup_sigint_handling();
   27                  score_log ~= g.score;                                                 27                  score_log ~= g.score;
   28                  flushed = false;                                                      28                  flushed = false;
................................................................................................................................................................................
   68          {                                                                             68          {
   69                  assert(g_output is null);                                             69                  assert(g_output is null);
   70                  g_output = this;                                                      70                  g_output = this;
   71                  extern(C) static void catch_sigint(int) { g_output.flush(); appl      71                  extern(C) static void catch_sigint(int) { g_output.flush(); appl
   72                  core.stdc.signal.signal(SIGINT, &catch_sigint);                       72                  core.stdc.signal.signal(SIGINT, &catch_sigint);
   73          }                                                                             73          }
   74  }                                                                                     74  }
                                                                                        >    75  */