00001 /* cuiClient.h 00002 */ 00003 #ifndef GAME_PLAYING_CUICLIENT_H 00004 #define GAME_PLAYING_CUICLIENT_H 00005 00006 #include "osl/game_playing/gameManager.h" 00007 namespace osl 00008 { 00009 namespace game_playing 00010 { 00011 class CuiClient : public GameManager 00012 { 00013 protected: 00014 std::istream& is; 00015 std::ostream& os; 00016 private: 00018 volatile int stop_by_outside; 00019 public: 00020 CuiClient(ComputerPlayer *black, ComputerPlayer *white, 00021 CsaLogger *l, std::istream&, std::ostream&); 00022 ~CuiClient(); 00023 void run(const char *black, const char *white); 00024 void run(); 00025 volatile int *stopFlag() { return &stop_by_outside; } 00026 protected: 00027 virtual void readAndProcessCommand()=0; 00028 virtual void processComputerMove(const MoveWithComment&, int seconds)=0; 00029 }; 00030 } // namespace game_playing 00031 } // namespace osl 00032 00033 #endif /* _CUICLIENT_H */ 00034 // ;;; Local Variables: 00035 // ;;; mode:c++ 00036 // ;;; c-basic-offset:2 00037 // ;;; End: