Beispiel #1
0
        private void SetRankTexture()
        {
            switch (FlopBoard.RankTexture)
            {
            case FlopBoardRankTextureEnum.ThreeSome:
                if (TurnCard.Rank == FlopBoard.Flop1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.Foursome;
                }
                else if (TurnCard.Rank > FlopBoard.Flop1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.LowTri;
                }
                else
                {
                    RankTexture = TurnBoardRankTextureEnum.HighTri;
                }
                break;

            case FlopBoardRankTextureEnum.HighPair:
                var highPairBoard = new HighPairRankTexture(FlopBoard);
                if (TurnCard.Rank == highPairBoard.PairCard1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.HighTri;
                }
                else if (TurnCard.Rank == highPairBoard.SingleCard.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.TwoPairs;
                }
                else if (TurnCard.Rank > highPairBoard.PairCard1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.MiddlePair;
                }
                else
                {
                    RankTexture = TurnBoardRankTextureEnum.HighPair;
                }
                break;

            case FlopBoardRankTextureEnum.LowPair:
                var lowPairBoard = new LowPairRankTexture(FlopBoard);
                if (TurnCard.Rank == lowPairBoard.PairCard1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.LowTri;
                }
                else if (TurnCard.Rank == lowPairBoard.SingleCard.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.TwoPairs;
                }
                else if (TurnCard.Rank < lowPairBoard.PairCard1.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.MiddlePair;
                }
                else
                {
                    RankTexture = TurnBoardRankTextureEnum.LowPair;
                }
                break;

            case FlopBoardRankTextureEnum.Singles:
                var singlesBoard = new SinglesRankTexture(FlopBoard);
                if (TurnCard.Rank == singlesBoard.HighCard.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.HighPair;
                }
                else if (TurnCard.Rank == singlesBoard.MiddleCard.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.MiddlePair;
                }
                else if (TurnCard.Rank == singlesBoard.LowCard.Rank)
                {
                    RankTexture = TurnBoardRankTextureEnum.LowPair;
                }
                else
                {
                    RankTexture = TurnBoardRankTextureEnum.Singles;
                }
                break;

            default:
                throw new InvalidOperationException();
            }
        }
Beispiel #2
0
        private void SetupRankTexture()
        {
            switch (TurnBoard.RankTexture)
            {
            case TurnBoardRankTextureEnum.Foursome:
                RankTexture = RiverRankTextureEnum.Foursome;
                break;

            case TurnBoardRankTextureEnum.HighTri:
                var highTri = new HighTriRankTexture(TurnBoard);
                if (River.Rank == highTri.TriCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.Foursome;
                }
                else if (River.Rank == highTri.SingleCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighTriLowPair;
                }
                else if (River.Rank > highTri.TriCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.MiddleTri;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.HighTri;
                }
                break;

            case TurnBoardRankTextureEnum.LowTri:
                var lowTri = new LowTriRankTexture(TurnBoard);
                if (River.Rank == lowTri.TriCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.Foursome;
                }
                else if (River.Rank == lowTri.SingleCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTriHighPair;
                }
                else if (River.Rank > lowTri.TriCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTri;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.MiddleTri;
                }
                break;

            case TurnBoardRankTextureEnum.TwoPairs:
                var twoPairs = new TwoPairsRankTexture(TurnBoard);
                if (River.Rank == twoPairs.HighPairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighTriLowPair;
                }
                else if (River.Rank == twoPairs.LowPairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTriHighPair;
                }
                else if (River.Rank > twoPairs.HighPairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTwoPairs;
                }
                else if (River.Rank > twoPairs.LowPairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighLowTwoPairs;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.HighTwoPairs;
                }
                break;

            case TurnBoardRankTextureEnum.HighPair:
                var highPair = new HighPairRankTexture(TurnBoard);
                if (River.Rank == highPair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighTri;
                }
                else if (River.Rank == highPair.MiddleCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighTwoPairs;
                }
                else if (River.Rank == highPair.LowCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighLowTwoPairs;
                }
                else if (River.Rank > highPair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.SecondPair;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.HighPair;
                }
                break;

            case TurnBoardRankTextureEnum.MiddlePair:
                var middlePair = new MiddlePairRankTexture(TurnBoard);
                if (River.Rank == middlePair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.MiddleTri;
                }
                else if (River.Rank == middlePair.HighCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighTwoPairs;
                }
                else if (River.Rank == middlePair.LowCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTwoPairs;
                }
                else if (River.Rank > middlePair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.ThirdPair;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.SecondPair;
                }
                break;

            case TurnBoardRankTextureEnum.LowPair:
                var lowPair = new LowPairRankTexture(TurnBoard);
                if (River.Rank == lowPair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTri;
                }
                else if (River.Rank == lowPair.HighCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighLowTwoPairs;
                }
                else if (River.Rank == lowPair.MiddleCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowTwoPairs;
                }
                else if (River.Rank > lowPair.PairCard1.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowPair;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.ThirdPair;
                }
                break;

            case TurnBoardRankTextureEnum.Singles:
                var singles = new SinglesRankTexture(TurnBoard);
                if (River.Rank == singles.HighCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.HighPair;
                }
                else if (River.Rank == singles.SecondCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.SecondPair;
                }
                else if (River.Rank == singles.ThirdCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.ThirdPair;
                }
                else if (River.Rank == singles.LowCard.Rank)
                {
                    RankTexture = RiverRankTextureEnum.LowPair;
                }
                else
                {
                    RankTexture = RiverRankTextureEnum.Singles;
                }
                break;

            default:
                throw new InvalidOperationException();
            }
        }