00001 /* timeKeeper.h 00002 */ 00003 #ifndef GAME_PLAYING_TIMEKEEPER_H 00004 #define GAME_PLAYING_TIMEKEEPER_H 00005 00006 #include "osl/player.h" 00007 #include <boost/scoped_ptr.hpp> 00008 namespace osl 00009 { 00010 namespace game_playing 00011 { 00012 class TimeKeeper 00013 { 00014 class Stack; 00015 boost::scoped_ptr<Stack> seconds; 00016 public: 00017 TimeKeeper(); 00018 TimeKeeper(int black_time, int white_time); 00019 ~TimeKeeper(); 00020 00021 void reset(int black_time, int white_time); 00022 00023 void pushMove(Player, int seconds); 00024 void popMove(); 00025 int timeLeft(Player) const; 00026 int timeElapsed(Player) const; 00027 int timeLimit(Player) const; 00028 }; 00029 } // namespace game_playing 00030 } // namespace osl 00031 00032 #endif /* GAME_PLAYING_TIMEKEEPER_H */ 00033 // ;;; Local Variables: 00034 // ;;; mode:c++ 00035 // ;;; c-basic-offset:2 00036 // ;;; End: