00001
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 };
00027 }
00028 }
00029
00030 #endif
00031
00032
00033
00034