GR.Gambling.Backgammon.GameState.CanDouble C# (CSharp) Method

CanDouble() public method

Tries to deduce if the player on turn can double.
public CanDouble ( ) : bool
return bool
        public bool CanDouble()
        {
            if (crawford || (!cube.Centered && cube.Owner != player_on_roll) || cube.Value >= 64 || DiceRolled) // should be player on turn
                return false;

            // Match.. Could double, but pointless, even might cause harm?
            if (GameType == GameType.Match && Score(player_on_roll) + cube.Value >= match_to)
                return false;

            // Money game
            if (GameType == GameType.Money && limit > stake)
            {
                if (stake * cube.Value >= limit)
                    return false;
            }

            return true;
        }