00001 /************************************************************************** 00002 00003 Chess Clock 00004 00005 Copyright (c) Arto Hyvättinen 2010 00006 00007 This file is part of Chess Clock software. 00008 00009 Chess Clock is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 Chess Clock is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 00020 **************************************************************************/ 00021 00022 #ifndef TURNINFORMATION_H 00023 #define TURNINFORMATION_H 00024 00034 class TurnInformation 00035 { 00036 public: 00041 TurnInformation(int turnId, bool white); 00042 00043 int getTurnId() { return turnId_; } 00044 00047 int getDuration() { return duration_; } 00048 00051 int getPaused() { return paused_; } 00052 00055 int getTimeAfter(); 00056 bool isWhiteTurn() { return white_; } 00057 00058 void addTime( int msecs ); 00059 void addPause( int msecs ); 00060 00067 void turnReady( int msecs ); 00068 00069 00070 protected: 00071 int turnId_; 00072 int duration_; 00073 int paused_; 00074 int timeAfter_; 00075 bool turnReady_; 00076 bool white_; 00077 }; 00078 00079 #endif // TURNINFORMATION_H