cuiClient.h
Go to the documentation of this file.
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:
00028       virtual bool readAndProcessCommand()=0;
00029       virtual void processComputerMove(const search::MoveWithComment&, int seconds)=0;
00030     };
00031   } // namespace game_playing
00032 } // namespace osl
00033 
00034 #endif /* _CUICLIENT_H */
00035 // ;;; Local Variables:
00036 // ;;; mode:c++
00037 // ;;; c-basic-offset:2
00038 // ;;; End:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines