コード例 #1
0
 string OverrideName(EButtonType type, EButtonSlot slot)
 {
     //if (slot == EButtonSlot.First && type == EButtonType.InTurn)
     if (slot == EButtonSlot.First)
     {
         if (PokerObserver.Game.MaxCurrentBetting == 0 || PokerObserver.Game.CurrentBettingDiff == 0)
         {
             return("XEM BÀI");
         }
     }
     else if (slot == EButtonSlot.First && type == EButtonType.OutTurn)
     {
         if (PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting)
         {
             return("TỰ ĐỘNG XEM BÀI");
         }
     }
     return(null);
 }
コード例 #2
0
    string AddMoreTextButton(EButtonType type, EButtonSlot slot)
    {
        if (PokerObserver.Game.gameDetails != null)
        {
            if (slot == EButtonSlot.Third && type == EButtonType.OutGame)
            {
                return(PokerObserver.Game.LastBetForSitdown.ToString("#,##"));
            }

            if ((type == EButtonType.InTurn || type == EButtonType.OutTurn) && slot == EButtonSlot.First)
            {
                double diff = PokerObserver.Game.CurrentBettingDiff;
                if (diff > 0)
                {
                    return(diff.ToString("#,##"));
                }
            }
        }
        return(null);
    }
コード例 #3
0
 bool EnableButton(EButtonType type, EButtonSlot slot)
 {
     if (slot == EButtonSlot.Third && type == EButtonType.InTurn)
     {
         try
         {
             if (GetMaxRaise() <= 0)
             {
                 return(false);
             }
             else
             {
                 return(PokerObserver.Game.MainPlayer.GetMoney() + PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting);
             }
         } catch (Exception ex) {
             return(PokerObserver.Game.MainPlayer.GetMoney() + PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting);
         }
     }
     else if (type == EButtonType.OutTurn && PokerObserver.Game.MainPlayer.GetMoney() == 0)
     {
         return(false);
     }
     return(true);
 }
コード例 #4
0
    bool EnableButton(EButtonType type, EButtonSlot slot)
    {
        if (slot == EButtonSlot.Third && type == EButtonType.InTurn) {
			try 
            {
                if (GetMaxRaise() <= 0)
                    return false;
                else
                    return PokerObserver.Game.MainPlayer.GetMoney() + PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting;
			} catch (Exception ex) {
                return PokerObserver.Game.MainPlayer.GetMoney() + PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting;
			}
        }
        else if (type == EButtonType.OutTurn && PokerObserver.Game.MainPlayer.GetMoney() == 0)
			return false;
        return true;
    }
コード例 #5
0
 string OverrideName(EButtonType type, EButtonSlot slot)
 {
     //if (slot == EButtonSlot.First && type == EButtonType.InTurn)
     if (slot == EButtonSlot.First)
     {
         if(PokerObserver.Game.MaxCurrentBetting == 0 || PokerObserver.Game.CurrentBettingDiff == 0)
             return "XEM BÀI";
     }
     else if (slot == EButtonSlot.First && type == EButtonType.OutTurn)
     {
         if (PokerObserver.Game.MainPlayer.currentBet >= PokerObserver.Game.MaxCurrentBetting)
             return "TỰ ĐỘNG XEM BÀI";
     }
     return null;
 }
コード例 #6
0
    string AddMoreTextButton(EButtonType type, EButtonSlot slot)
    {
        if (PokerObserver.Game.gameDetails != null)
        {
            if (slot == EButtonSlot.Third && type == EButtonType.OutGame)
                return PokerObserver.Game.LastBetForSitdown.ToString("#,##");

            if ((type == EButtonType.InTurn || type == EButtonType.OutTurn) && slot == EButtonSlot.First)
            {
                double diff = PokerObserver.Game.CurrentBettingDiff;
                if(diff > 0)
                    return diff.ToString("#,##");
            }
        }
        return null;
    }