示例#1
0
 public void WaitPlayerDrawingAction(PokerEngine.Player player, PokerEngine.Engine.PlayerDrawingAction action)
 {
     helper.WaitPlayerDrawingAction(player, action);
     if (action.DrawnCards.Count == 1)
     {
         Speak("All I need is just one card...");
     }
     else if (action.DrawnCards.Count == 0)
     {
         Speak("You might as well fold. I don't need any card!");
     }
 }
示例#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;
            }
        }
示例#3
0
 public override void NotifyPlayerStatus(PokerEngine.Player player, bool isWinner)
 {
     base.NotifyPlayerStatus(player, isWinner);
     if (player.Name == name)
     {
         if (isWinner)
         {
             Speak("Come to papa");
         }
         else
         {
             Speak("Do you accept checks?");
         }
     }
 }
示例#4
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);
            }
        }
示例#5
0
 /// <summary>
 /// Called by the client to get the player drawing response.
 /// </summary>
 /// <param name="player">The player which draws the cards</param>
 /// <param name="action">The action which should be modified according to the player actions</param>
 public void WaitPlayerDrawingAction(PokerEngine.Player player, PokerEngine.Engine.PlayerDrawingAction action)
 {
     CheckWaitLimit();
     Invoke <PokerEngine.Player, PokerEngine.Engine.PlayerDrawingAction>(helper.WaitPlayerDrawingAction, player, action);
 }
示例#6
0
 /// <summary>
 /// Updates the current client with the new cards drawn.
 /// </summary>
 /// <param name="player">
 /// The player with the new updated cards
 /// </param>
 public void NotifyPlayerNewCards(PokerEngine.Player player)
 {
     Invoke <PokerEngine.Player>(helper.NotifyPlayerNewCards, player);
 }
示例#7
0
 /// <summary>
 /// Called by the client to notify how many cards were drawn by the player
 /// </summary>
 /// <param name="player">The drawing players</param>
 /// <param name="drawCount">The amount of cards drawn. Can be 0</param>
 public void NotifyPlayerDraws(PokerEngine.Player player, int drawCount)
 {
     Invoke <PokerEngine.Player, int>(helper.NotifyPlayerDraws, player, drawCount);
 }
示例#8
0
 public void NotifyPlayerNewCards(PokerEngine.Player player)
 {
     helper.NotifyPlayerNewCards(player);
 }
示例#9
0
 public void NotifyPlayerDraws(PokerEngine.Player player, int drawCount)
 {
     helper.NotifyPlayerDraws(player, drawCount);
 }