1 /**************************************************************************
5 Copyright (c) Arto Hyvättinen 2010
7 This file is part of Chess Clock software.
9 Chess Clock is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 Chess Clock is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
20 **************************************************************************/
22 #ifndef TURNINFORMATION_H
23 #define TURNINFORMATION_H
25 /*! Turn information class
27 @author Arto Hyvättinen
30 Store information about one turn of player
37 /*! Turn information object
39 @param turnId Id of turn of player
40 @param white true if turn on white, false id black */
41 TurnInformation(int turnId, bool white);
43 int getTurnId() { return turnId_; }
46 @return Duration of turn in msecs */
47 int getDuration() { return duration_; }
49 /*! Duration of pauses during this turn
50 @return Duration of pauses in msecs */
51 int getPaused() { return paused_; }
53 /*! Time available for this player after this turn
54 @return Time available in msecs */
56 bool isWhiteTurn() { return white_; }
58 void addTime( int msecs );
59 void addPause( int msecs );
63 Turn will be locked to chances.
65 @param msecs Time available after this turn in msecs
67 void turnReady( int msecs );
71 int turnId_; /*! id of turn */
72 int duration_; /*! duration of turn in msecs */
73 int paused_; /*! duration of pauses in msecs */
74 int timeAfter_; /*! time available after this turn in msecs */
75 bool turnReady_; /*! turn is ready and locked */
76 bool white_; /*! turn of white player? */
79 #endif // TURNINFORMATION_H