… | |
… | |
20 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 | --> |
21 | --> |
22 | </head> |
22 | </head> |
23 | <body> |
23 | <body> |
24 | |
24 | |
25 | <h1>$Revision: 1.14 $</h1> |
25 | <h1>$Revision: 1.15 $</h1> |
26 | |
26 | |
27 | <h1>KGS Protocol Description</h1> |
27 | <h1>KGS Protocol Description</h1> |
28 | |
28 | |
29 | <p>This XML document describes the KGS protocol. It is also used |
29 | <p>This XML document describes the KGS protocol. It is also used |
30 | to automatically generate the perl parser for all the messages and |
30 | to automatically generate the perl parser for all the messages and |
… | |
… | |
128 | <p>Komi values are multiplied by 2 to make them integer in the |
128 | <p>Komi values are multiplied by 2 to make them integer in the |
129 | protocol.</p> |
129 | protocol.</p> |
130 | |
130 | |
131 | <type name="result" type="I32" multiplier="2"/> |
131 | <type name="result" type="I32" multiplier="2"/> |
132 | |
132 | |
133 | <p>The game result is also multiplied by four to give it higher |
133 | <p>The game result is also multiplied by two to give it higher |
134 | resolution. There are also special values for wins by time etc.</p> |
134 | resolution. There are also special values for wins by time etc., either |
|
|
135 | in result or in the score* types, or both :)</p> |
135 | |
136 | |
136 | <type name="score16" type="I16" multiplier="4"/> |
137 | <type name="score16" type="I16" multiplier="4"/> |
137 | <type name="score32" type="I32" multiplier="4"/> |
138 | <type name="score32" type="I32" multiplier="4"/> |
138 | |
139 | |
139 | <p>A score value (used for displaying the score at the end of a game) |
140 | <p>A score value (used for displaying the score at the end of a game) |
140 | are multiplied by four for a change. I have not yet seen 0.25 scores, |
141 | are multiplied by four for a change (the 0.25 resolution is not |
141 | please somebody tell me where they happen, or if they happen.</p> |
142 | used). In game structures it is encoded by dividing by two, though, so |
|
|
143 | watch out!</p> |
142 | |
144 | |
143 | <type name="time" type="U32" multiplier="1000"/> |
145 | <type name="time" type="U32" multiplier="1000"/> |
144 | |
146 | |
145 | <p>Time values are multiplied by 1000, giving them millisecond |
147 | <p>Time values are multiplied by 1000, giving them millisecond |
146 | accuracy.</p> |
148 | accuracy.</p> |
… | |
… | |
417 | Owner |
419 | Owner |
418 | <member name="size" type="U32"/> |
420 | <member name="size" type="U32"/> |
419 | <member name="handicap" type="I32"/> |
421 | <member name="handicap" type="I32"/> |
420 | < 0 not fully setup |
422 | < 0 not fully setup |
421 | <member name="komi" type="komi32"/> |
423 | <member name="komi" type="komi32"/> |
422 | <member name="moves" type="U16"/> |
424 | <member name="moves" type="I16"/> |
423 | This field reflects either the movenum or the score, sorry, not even guards help, as |
425 | This field reflects either the movenum or the score, sorry, not even guards help, as |
424 | the flags to determine that are _after_ the field. Arg. Divide by two to get the score. |
426 | the flags to determine that are _after_ the field. Arg. Divide by two to get the actual |
|
|
427 | score (NOT score16!). |
425 | <member name="flags" type="U16"/> |
428 | <member name="flags" type="U16"/> |
426 | <member name="observers" type="U32"/> |
429 | <member name="observers" type="U32"/> |
427 | <member name="saved" type="flag"/> |
430 | <member name="saved" type="flag"/> |
428 | <member name="notes" type="STRING" guard-member="handicap" guard-cond="< 0"/> |
431 | <member name="notes" type="STRING" guard-member="handicap" guard-cond="< 0"/> |
429 | </struct> |
432 | </struct> |