本文整理汇总了C#中IPlayer.PlayerFold方法的典型用法代码示例。如果您正苦于以下问题:C# IPlayer.PlayerFold方法的具体用法?C# IPlayer.PlayerFold怎么用?C# IPlayer.PlayerFold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPlayer
的用法示例。
在下文中一共展示了IPlayer.PlayerFold方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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;
}
}