[Top][All Lists]

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

Re: [Bug-gnubg] question about coding of matchId

From: Joern Thyssen
Subject: Re: [Bug-gnubg] question about coding of matchId
Date: Thu, 1 Jan 2004 23:03:35 +0000
User-agent: Mutt/1.4.1i

On Thu, Jan 01, 2004 at 09:17:07PM +0100, Misja Alma wrote
> Hi,
> I'm writing an application that can use your matchId as an input. I found
> the explanation of how matchId is coded in the gnubg tutorial. But I have
> one question left: Bits 16-18 and 19-21 are used to code the dice. It says
> in the description that when the dice are not yet rolled, those bits will
> all be zero. But now I noticed that in the initial position the bits are all
> ones, as if I just rolled 7-7. Does the value of 7 for a die really have a
> specific meaning? Or have I made a mistake somewhere?

No, probably not.

For some reason the dice are initialised to -1 when the initial board is
shown with no match in progress. -1 (in 2's complement) and'ed with 0x07
is 7, which is exactly what you see. 

I don't think you should care about it, as no match is in progress.
Everywhere else the dice should be in the range 0-6, with 0 meaning no
dice rolled.


Attachment: pgp3WR4I6lXTF.pgp
Description: PGP signature

reply via email to

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