コード例 #1
0
ファイル: MiddleGameDecorator.cs プロジェクト: shoferb/OYAOB
 private int GetMinAllowedRaise(int lastRaiseInRound, int maxCommited, GameRoom.HandStep step)
 {
     if (GameMode == GameMode.NoLimit)
     {
         if (lastRaiseInRound > 0)
         {
             return(lastRaiseInRound);
         }
         return(maxCommited);
     }
     if (GameMode == GameMode.Limit)
     {
         if (step == GameRoom.HandStep.PreFlop || step == GameRoom.HandStep.Flop)
         {
             return(BB);
         }
         return(2 * BB);
     }
     return(0);
 }
コード例 #2
0
ファイル: MiddleGameDecorator.cs プロジェクト: shoferb/OYAOB
        private int GetMaxAllowedRaise(int maxCommited, int RoundChipBet, int PotCount, GameRoom.HandStep step)
        {
            switch (GameMode)
            {
            case GameMode.Limit:
                switch (step)
                {
                case GameRoom.HandStep.Flop:
                case GameRoom.HandStep.PreFlop:
                    return(BB);

                case GameRoom.HandStep.River:
                case GameRoom.HandStep.Turn:
                    return(BB * 2);
                }
                break;

            case GameMode.NoLimit:
                return(int.MaxValue);

            case GameMode.PotLimit:
                return(PotCount + maxCommited - RoundChipBet);

            default:
                break;
            }
            //not spouse to arrive here
            return(-1);
        }
コード例 #3
0
 public bool CanRaise(int lastRaiseInRound, int currentPlayerRaise, int maxBetInRound, int RoundChipBet, int PotCount, GameRoom.HandStep step)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
ファイル: MiddleGameDecorator.cs プロジェクト: shoferb/OYAOB
 public bool CanRaise(int lastRaiseInRound, int currentPlayerRaise, int maxBetInRound, int RoundChipBet, int PotCount, GameRoom.HandStep step)
 {
     if (currentPlayerRaise > 0 && currentPlayerRaise <= GetMaxAllowedRaise(maxBetInRound, RoundChipBet, PotCount, step) &&
         currentPlayerRaise >= GetMinAllowedRaise(lastRaiseInRound, maxBetInRound, step))
     {
         return(true);
     }
     return(false);
 }
コード例 #5
0
 public bool CanRaise(int lastRaiseInRound, int currentPlayerRaise, int maxBetInRound, int RoundChipBet, int PotCount, GameRoom.HandStep step)
 {
     return(NextDecorator.CanRaise(lastRaiseInRound, currentPlayerRaise, maxBetInRound, RoundChipBet, PotCount, step));
 }