[Top][All Lists]

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

[Bug-gnubg] GNUBG ID and Beavers

From: M. J. Mannon
Subject: [Bug-gnubg] GNUBG ID and Beavers
Date: Thu, 28 Jul 2011 09:40:17 -0700 (PDT)

Sorry about the HTML mess in my last post. Let's try again.
- Mike
// Although the GNUBG documentation is unambiguous is its explanation
// that the dice owner and the turn owner are not the same player
// after a double is offered, no mention is made of beavers.
// A consistent, unambiguous interpretation is that after a beaver
// is offered, the double-offered flag is set, and that the dice
// owner and turn owner are the same player. That interpretation
// is supported in the code of this routine. If it is not allowed
// under GNUBG, no harm is done, because then that arrangement of
// state variables should never occur.
// typeOfDouble
// When a double or beaver occurs, this variable is used in the
// formation of the message that describes the action.
std::string typeOfDouble;
if( !doubleOffered() ) typeOfDouble = "no double";
else if( turnOwner() == diceOwner() ) typeOfDouble = "beaver";
else if( cubePosition() == cubeCentered ) typeOfDouble = "double";
else  typeOfDouble = "redouble";

reply via email to

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