… | |
… | |
19 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | --> |
20 | --> |
21 | </head> |
21 | </head> |
22 | <body> |
22 | <body> |
23 | |
23 | |
24 | <h1>$Revision: 1.12 $</h1> |
24 | <h1>$Revision: 1.13 $</h1> |
25 | |
25 | |
26 | <h1>KGS Protocol Description</h1> |
26 | <h1>KGS Protocol Description</h1> |
27 | |
27 | |
28 | <p>This XML document describes the KGS protocol. It is also used |
28 | <p>This XML document describes the KGS protocol. It is also used |
29 | to automatically generate the perl parser for all the messages and |
29 | to automatically generate the perl parser for all the messages and |
… | |
… | |
191 | <h4>TYPE result</h4> |
191 | <h4>TYPE result</h4> |
192 | BASE TYPE: I32<br /> |
192 | BASE TYPE: I32<br /> |
193 | LENGTH: <br /> |
193 | LENGTH: <br /> |
194 | MULTIPLIER: 2<br /> |
194 | MULTIPLIER: 2<br /> |
195 | |
195 | |
196 | <p>The game result is also multiplied by four to give it higher |
196 | <p>The game result is also multiplied by two to give it higher |
197 | resolution. There are also special values for wins by time etc.</p> |
197 | resolution. There are also special values for wins by time etc., either |
|
|
198 | in result or in the score* types, or both :)</p> |
198 | |
199 | |
199 | <h4>TYPE score16</h4> |
200 | <h4>TYPE score16</h4> |
200 | BASE TYPE: I16<br /> |
201 | BASE TYPE: I16<br /> |
201 | LENGTH: <br /> |
202 | LENGTH: <br /> |
202 | MULTIPLIER: 4<br /> |
203 | MULTIPLIER: 4<br /> |
… | |
… | |
204 | BASE TYPE: I32<br /> |
205 | BASE TYPE: I32<br /> |
205 | LENGTH: <br /> |
206 | LENGTH: <br /> |
206 | MULTIPLIER: 4<br /> |
207 | MULTIPLIER: 4<br /> |
207 | |
208 | |
208 | <p>A score value (used for displaying the score at the end of a game) |
209 | <p>A score value (used for displaying the score at the end of a game) |
209 | are multiplied by four for a change. I have not yet seen 0.25 scores, |
210 | are multiplied by four for a change (the 0.25 resolution is not |
210 | please somebody tell me where they happen, or if they happen.</p> |
211 | used). In game structures it is encoded by dividing by two, though, so |
|
|
212 | watch out!</p> |
211 | |
213 | |
212 | <h4>TYPE time</h4> |
214 | <h4>TYPE time</h4> |
213 | BASE TYPE: U32<br /> |
215 | BASE TYPE: U32<br /> |
214 | LENGTH: <br /> |
216 | LENGTH: <br /> |
215 | MULTIPLIER: 1000<br /> |
217 | MULTIPLIER: 1000<br /> |
… | |
… | |
1807 | <td colspan="4"> |
1809 | <td colspan="4"> |
1808 | </td> |
1810 | </td> |
1809 | </tr> |
1811 | </tr> |
1810 | <tr> |
1812 | <tr> |
1811 | <td>moves</td> |
1813 | <td>moves</td> |
1812 | <td>U16</td> |
1814 | <td>I16</td> |
1813 | <td></td> |
1815 | <td></td> |
1814 | <td> |
1816 | <td> |
1815 | <b></b> </td> |
1817 | <b></b> </td> |
1816 | </tr> |
1818 | </tr> |
1817 | <tr> |
1819 | <tr> |
1818 | <td colspan="4"> |
1820 | <td colspan="4"> |
1819 | This field reflects either the movenum or the score, sorry, not even guards help, as |
1821 | This field reflects either the movenum or the score, sorry, not even guards help, as |
1820 | the flags to determine that are _after_ the field. Arg. Divide by two to get the score. |
1822 | the flags to determine that are _after_ the field. Arg. Divide by two to get the actual |
|
|
1823 | score (NOT score16!). |
1821 | </td> |
1824 | </td> |
1822 | </tr> |
1825 | </tr> |
1823 | <tr> |
1826 | <tr> |
1824 | <td>flags</td> |
1827 | <td>flags</td> |
1825 | <td>U16</td> |
1828 | <td>U16</td> |