// $Id: CMsgOsRequestDelta.htm 119 2004-05-16 00:02:24Z ggs_mburo $ // This is a GGS file, licensed under the GPL CMsgOsRequestDelta

CMsgOsRequestDelta : public CMsgOs

This is a match request, challenging someone to a game. This message is sent both when a new challenge is issued and when an old challenge is cancelled. Challenges are normally directed at a specific player but can also be generic.

Challenges are withdrawn if the are accepted, declined, or one of the players leaves GGS.

Variables

boolfPlustrue if a new match request is being issued, false if an old match request is being withdrawn
stringidr/os id of the request
COsRequestrequestThe request data

Functions

boolIAmChallenged()returns true if I am the specific target of the challenge
boolIAmChallenging()returns true if I have issued the challenge
boolRequireAnti()Require the game be anti, or not anti (see below)
boolRequireBoardSize()Require a board size (see below)
boolRequireColor()Require a 'color' (see below)
boolRequireEqualClocks()Require both players have the same time control (see below)
boolRequireMaxOpponentClock()Require a maximum for the challenger's time (see below)
boolRequireMinMyClock()Require a minimum for the challenged player's time control (see below)
boolRequireRand()Require the game be rand, or not rand (see below)
boolRequireRated()Require the game be rated, or not rated (see below)

The Require functions all return true if the request fits the requirements, or false otherwise. If false, they also send a descriptive message to the challenger telling him why the request was declined.

For example, an "anti" game is one in which the winner is the player with the fewest discs. RequireAnti(true) requires that the game be anti . RequireAnti(false) requires that the game not be anti.

RequireColor(const char* legal) is similar, if the match 'color' character is not in the string it is rejected. A 'color' is (b)lack, (w)hite, (s)ynch, (k)omi, or (?)random.

See Also

HandleOsRequestDelta