Пример #1
0
 private static int GoAllIn(GameState.player player)
 {
     return(player.stack - player.bet);
 }
Пример #2
0
        private static int FoldAlways(GameState gameState, GameState.player player)
        {
            //if (gameState.community_cards.Length >= 3)
            //{
            //    var ourCards = player.hole_cards;
            //    var ourCardList = ourCards.ToList();
            //    ourCardList.AddRange(gameState.community_cards);

            //    var ourRanks = ourCardList.Select(y => y.rank);
            //    var ourGroups = ourRanks.GroupBy(y => y);


            //    Console.Error.WriteLine("exception, using FoldAlways Instead" + ex);

            //    if (gameState.community_cards.Length == 3)
            //    {
            //        if (ourGroups.Count() == 2)
            //        {
            //            return 153;
            //        }

            //        if (ourGroups.Count() == 3)
            //        {
            //            return 13;
            //        }
            //        //
            //        return 3;
            //    }

            //    if (gameState.community_cards.Length == 4)
            //    {
            //        if (ourGroups.Count() == 2)
            //        {
            //            return 145;
            //        }

            //        if (ourGroups.Count() == 3)
            //        {
            //            return 114;
            //        }

            //        if (ourGroups.Count() == 4)
            //        {
            //            return 14;
            //        }
            //        //
            //        return 4;
            //    }

            //    if (gameState.community_cards.Length == 5)
            //    {
            //        if (ourGroups.Count() == 2)
            //        {
            //            return 155;
            //        }

            //        if (ourGroups.Count() == 3)
            //        {
            //            return 145;
            //        }

            //        if (ourGroups.Count() == 4)
            //        {
            //            return 105;
            //        }
            //        //
            //        return 5;
            //    }

            //    return 1;
            //}
            //else
            //{
            //    Console.Error.WriteLine("FoldAlways - minimum_raise: "+ gameState.minimum_raise);

            //    return gameState.minimum_raise;
            //}
            Console.Error.WriteLine("FoldAlways - fold always: ");
            return(0);
        }
Пример #3
0
 private static int RaiseBet(GameState gameState, GameState.player player, int raise = 0, int scale = 1)
 {
     return(gameState.current_buy_in - player.bet + gameState.minimum_raise + raise * scale);
 }