本文整理汇总了C#中IPlayer.PlayerCall方法的典型用法代码示例。如果您正苦于以下问题:C# IPlayer.PlayerCall方法的具体用法?C# IPlayer.PlayerCall怎么用?C# IPlayer.PlayerCall使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlayer
的用法示例。
在下文中一共展示了IPlayer.PlayerCall方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PH
//Choice maker for bots if they have a hand which is a pair or two pairs
private static void PH(IPlayer player, int n, int n1, int r)
{
Random rand = new Random();
int rnd = rand.Next(1, 3);
if (Launcher.Poker.Rounds < 2)
{
if (Launcher.Poker.CallValue <= 0)
{
player.PlayerCheck();
}
if (Launcher.Poker.CallValue > 0)
{
if (Launcher.Poker.CallValue >= BotChoiceFormula(player.Chips, n1))
{
player.PlayerFold();
}
if (Launcher.Poker.Raise > BotChoiceFormula(player.Chips, n))
{
player.PlayerFold();
}
if (!player.FoldTurn)
{
if (Launcher.Poker.CallValue >= BotChoiceFormula(player.Chips, n) &&
Launcher.Poker.CallValue <= BotChoiceFormula(player.Chips, n1))
{
player.PlayerCall();
}
if (Launcher.Poker.Raise <= BotChoiceFormula(player.Chips, n) &&
Launcher.Poker.Raise >= (BotChoiceFormula(player.Chips, n)) / 2)
{
player.PlayerCall();
}
if (Launcher.Poker.Raise <= (BotChoiceFormula(player.Chips, n)) / 2)
{
if (Launcher.Poker.Raise > 0)
{
Launcher.Poker.Raise = BotChoiceFormula(player.Chips, n);
player.PlayerRaised();
}
else
{
Launcher.Poker.Raise = Launcher.Poker.CallValue * 2;
player.PlayerRaised();
}
}
}
}
}
if (Launcher.Poker.Rounds >= 2)
{
if (Launcher.Poker.CallValue > 0)
{
if (Launcher.Poker.CallValue >= BotChoiceFormula(player.Chips, n1 - rnd))
{
player.PlayerFold();
}
if (Launcher.Poker.Raise > BotChoiceFormula(player.Chips, n - rnd))
{
player.PlayerFold();
}
if (!player.FoldTurn)
{
if (Launcher.Poker.CallValue >= BotChoiceFormula(player.Chips, n - rnd) &&
Launcher.Poker.CallValue <= BotChoiceFormula(player.Chips, n1 - rnd))
{
player.PlayerCall();
}
if (Launcher.Poker.Raise <= BotChoiceFormula(player.Chips, n - rnd) &&
Launcher.Poker.Raise >= (BotChoiceFormula(player.Chips, n - rnd)) / 2)
{
player.PlayerCall();
}
if (Launcher.Poker.Raise <= (BotChoiceFormula(player.Chips, n - rnd)) / 2)
{
if (Launcher.Poker.Raise > 0)
{
Launcher.Poker.Raise = BotChoiceFormula(player.Chips, n - rnd);
player.PlayerRaised();
}
else
{
Launcher.Poker.Raise = Launcher.Poker.CallValue * 2;
player.PlayerRaised();
}
}
}
}
//.........这里部分代码省略.........
示例2: Smooth
//Choice maker for bots with a hand three of a kind or higher
private static void Smooth(IPlayer player, int n)
{
if (Launcher.Poker.CallValue <= 0)
{
player.PlayerCheck();
}
else
{
if (Launcher.Poker.CallValue >= BotChoiceFormula(player.Chips, n))
{
if (player.Chips > Launcher.Poker.CallValue)
{
player.PlayerCall();
}
else if (player.Chips <= Launcher.Poker.CallValue)
{
Launcher.Poker.Raising = false;
player.IsPlayerTurn = false;
player.Chips = 0;
player.Status.Text = "Call " + player.Chips;
Launcher.Poker.TextBoxPot.Text = (int.Parse(Launcher.Poker.TextBoxPot.Text) + player.Chips).ToString();
}
}
else
{
if (Launcher.Poker.Raise > 0)
{
if (player.Chips >= Launcher.Poker.Raise * 2)
{
player.PlayerRaised();
}
else
{
player.PlayerCall();
}
}
else
{
Launcher.Poker.Raise = Launcher.Poker.CallValue * 2;
player.PlayerRaised();
}
}
}
if (player.Chips <= 0)
{
player.IsPlayerTurn = true;
}
}
示例3: HP
//A choice generator for bots. This generator is used when bot has only high card or table pair hand
private static void HP(IPlayer player, int n, int n1)
{
Random rand = new Random();
int rnd = rand.Next(1, 4);
if (Launcher.Poker.CallValue <= 0)
{
player.PlayerCheck();
}
if (Launcher.Poker.CallValue > 0)
{
if (rnd == 1)
{
if (Launcher.Poker.CallValue <= BotChoiceFormula(player.Chips, n))
{
player.PlayerCall();
}
else
{
player.PlayerFold();
}
}
if (rnd == 2)
{
if (Launcher.Poker.CallValue <= BotChoiceFormula(player.Chips, n1))
{
player.PlayerCall();
}
else
{
player.PlayerFold();
}
}
}
if (rnd == 3)
{
if (Launcher.Poker.CallValue <= 0)
{
player.PlayerCheck();
}
else
{
if (Launcher.Poker.Raise == 0)
{
Launcher.Poker.Raise = Launcher.Poker.CallValue * 2;
player.PlayerRaised();
}
else
{
if (Launcher.Poker.Raise <= BotChoiceFormula(player.Chips, n))
{
Launcher.Poker.Raise = Launcher.Poker.CallValue * 2;
player.PlayerRaised();
}
else
{
player.PlayerFold();
}
}
}
}
if (player.Chips <= 0)
{
player.FoldTurn = true;
}
}