[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnubg] turn and on roll bits.

From: stormen
Subject: [Bug-gnubg] turn and on roll bits.
Date: Mon, 7 Jun 2010 09:26:55 -0700 (PDT)

I am making an app where I use the GNUbg match and position id formats. I
have read the two "technical" descriptions of the formats. The wording
"(note that the bit order is reversed below for readability)" in the
description of the match id puzzles me a little. Have I gotten the following
example right ?

match ID: cIn6AAAAAAAA

First decode wrt Base64 and write as binary using 6 bits:

c --> 28 --> 011100    I --> 8 --> 001000    n --> 39 --> 100111    6 --> 58
--> 111010
Each A goes to 000000

Now string 12 6 bits group together and reverse every 8 bits to get

0000111010010001010111110000 ... 0000

Now every group of more than 1 bit corresponding to an element of the match
state should be reversed, so eg. the game stat which is the bits 9, 10, 11
which is 100 in the above should be reversed to 001 indicating a game is
being played. Correct ? The on roll bit is the seventh and the turn bit is
the twelfth which are both 1. But this matchId was gotten by setting up a
new match between to humans with the lower player (player 0) winning the
opening roll. From the description I would have thought the turn and on roll
bits should be 0. What am I missing ?
View this message in context: 
Sent from the Gnu - Backgammon mailing list archive at Nabble.com.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]