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!"); } }
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; } }
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?"); } } }
/// <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); } }
/// <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); }
/// <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); }
/// <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); }
public void NotifyPlayerNewCards(PokerEngine.Player player) { helper.NotifyPlayerNewCards(player); }
public void NotifyPlayerDraws(PokerEngine.Player player, int drawCount) { helper.NotifyPlayerDraws(player, drawCount); }