Beispiel #1
0
        /// <summary>
        /// Chooses algorithm
        /// </summary>
        private void HandleSwipes()
        {
            Vector2 force = Vector2.Zero;

            if (game.MovmentType)
            {
                force += rightHandChecker.CheckHand(currentSkeleton);
                force += leftHandChecker.CheckHand(currentSkeleton);
            }

            else
            {
                force += rightHandChecker.AlternateCheckHand(currentSkeleton);
                force += leftHandChecker.AlternateCheckHand(currentSkeleton);
            }
            kinectStrategy.CurrentAcceleration = force;
        }
Beispiel #2
0
        private PlayerAction FlopLogic(Card firstCard, Card secondCard, GetTurnContext context)
        {
            var playHand = HandStrengthValuation.PreFlop(this.FirstCard, this.SecondCard);
            var handRank = HandChecker.CheckHand(firstCard, secondCard, CommunityCards);

            // TODO: Change raise values
            if (handRank == HandRankType.HighCard)
            {
                return(PlayerAction.CheckOrCall());
            }
            else if (handRank == HandRankType.Pair)
            {
                return(PlayerAction.Raise(RandomProvider.Next(2, 6)));
            }
            else if (handRank == HandRankType.TwoPairs)
            {
                return(PlayerAction.Raise(RandomProvider.Next(5, 11)));
            }
            else if (handRank == HandRankType.ThreeOfAKind)
            {
                return(PlayerAction.Raise(RandomProvider.Next(8, 20)));
            }
            else if (handRank == HandRankType.Straight)
            {
                return(PlayerAction.Raise(RandomProvider.Next(10, 23)));
            }
            else if (handRank == HandRankType.Flush)
            {
                return(PlayerAction.Raise(RandomProvider.Next(11, 25)));
            }
            else if (handRank == HandRankType.FullHouse)
            {
                return(PlayerAction.Raise(RandomProvider.Next(13, 26)));
            }
            else if (handRank == HandRankType.FourOfAKind)
            {
                return(PlayerAction.Raise(RandomProvider.Next(14, 26)));
            }

            return(PlayerAction.CheckOrCall());
        }