// $Id: COsClock.htm 119 2004-05-16 00:02:24Z ggs_mburo $ // This is a GGS file, licensed under the GPL
The COsClock class tells a player's remaining time in a game.
Variables | |
double tCurrent | Time remaining for this move |
double tIncrement | Time added to the clock after player makes a move. |
double tGrace | If the player loses on time, he has this much additional time to avoid a wipeout. |
int iTimeout | 0 = player has not timed-out 1 = player has timed out but can avoid a wipeout 2 = player was wiped-out on time |
Creation | |
COsClock() | Create a clock - blank or with a specified (row,col) |
Clear() | Clear all information from the game type. |
Modification | |
Update() | Updates the clock with a given amount of elapsed time. |
Information | |
TimeToMove() | Returns the time remaining for this move, given the time so far for this move. Also outputs what the new iTimeout value would be. |
Comparison | |
<=, ==, >= | Comparison operators are true if and only if all 3 time elements compare that way. |
I/O | |
In() | Reads from a stream in the GGF format, normally use the >> operator. |
Out() | Write to a stream in GGF format, normally use the << operator. |
InIOS() | Reads from a stream in the IOS format. |