Ejemplo n.º 1
0
 private void repondOnCall(PokerEngine.Engine.PlayerBettingAction action)
 {
     if (action.CallAmount == 0)
     {
         Speak("I'll take a free card");
     }
     else
     {
         Speak("Call. I want to see how it goes");
     }
 }
Ejemplo n.º 2
0
        public override void WaitPlayerBettingAction(PokerEngine.Player player, PokerEngine.Engine.PlayerBettingAction action)
        {
            base.WaitPlayerBettingAction(player, action);
            switch (action.Action)
            {
            case PokerEngine.Engine.BetAction.CheckOrCall: repondOnCall(action); break;

            case PokerEngine.Engine.BetAction.Fold: respondOnFold(action); break;

            case PokerEngine.Engine.BetAction.Raise: respondOnRaise(action); break;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Called by the client when a bet decision should be made.
        /// </summary>
        /// <param name="player">The automated player.
        /// </param>
        /// <param name="action">The betting action which must be modified to pass the client response</param>
        public override void Bet(PokerEngine.Player player, PokerEngine.Engine.PlayerBettingAction action)
        {
            int decision = rand.Next(100);

            // the decision is with in the call percent range, call:
            if (decision < callPercent)
            {
                action.Call();
            }
            else
            {
                // out of the range, raise!
                action.Raise(action.RaiseAmount);
            }
        }
Ejemplo n.º 4
0
 private void respondOnRaise(PokerEngine.Engine.PlayerBettingAction action)
 {
     Speak("Raise!, you might as well fold");
 }
Ejemplo n.º 5
0
 private void respondOnFold(PokerEngine.Engine.PlayerBettingAction action)
 {
     Speak("Call! I mean fold...");
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Called by the client to get the current player betting action. Derived classes must implement it and respond with a
 /// proper action
 /// </summary>
 /// <param name="player">The player which needs to bet</param>
 /// <param name="action">The action to use to pass the player response</param>
 public void WaitPlayerBettingAction(PokerEngine.Player player, PokerEngine.Engine.PlayerBettingAction action)
 {
 }