public MemberHistoryResult(GamePayoutEngine gamePayoutEngine, PaylineRepository paylineRepository, GameInfoRepository gameInfoRepository, HistoryDecoderFactory historyDecoderFactory)
        {
            this.gamePayoutEngine      = gamePayoutEngine;
            this.paylineRepository     = paylineRepository;
            this.gameInfoRepository    = gameInfoRepository;
            this.historyDecoderFactory = historyDecoderFactory;

            WinTableByGame = new Dictionary <GameIdEnum, Func <Dictionary <int, List <PaylineConfig> >, SpinXml, List <byte[, ]> > >
            {
                { GameIdEnum.FortuneTree, gamePayoutEngine.PayoutWays },
                { GameIdEnum.WorldSoccerSlot2, gamePayoutEngine.PayoutWays },
                { GameIdEnum.MoneyMonkey, gamePayoutEngine.PayoutWays },
                { GameIdEnum.JazzItUp, gamePayoutEngine.PayoutWays },
                { GameIdEnum.WolvesSlot, gamePayoutEngine.PayoutWays }
            };

            WinTableByPaylineType = new Dictionary <PaylineType, Func <Dictionary <int, List <PaylineConfig> >, SpinXml, List <byte[, ]> > >
            {
                { PaylineType.ThreeByThree, gamePayoutEngine.PayoutNormalIndependent },
                { PaylineType.ThreeByThreeOutsource, gamePayoutEngine.PayoutNormalIndependent },
                { PaylineType.ThreeByThree27Ways, gamePayoutEngine.PayoutWaysIndependent },
                { PaylineType.ThreeByFive, gamePayoutEngine.PayoutNormal },
                { PaylineType.ThreeByFive2, gamePayoutEngine.PayoutNormal },
                { PaylineType.ThreeByFiveCollapsing, gamePayoutEngine.PayoutNormal },
                { PaylineType.FourByFive, gamePayoutEngine.PayoutNormal },
                { PaylineType.ThreeFourFiveSixSevenSevenReels, gamePayoutEngine.PayoutNormal },
                { PaylineType.ThreeByThreeMatchingReels, gamePayoutEngine.PayoutNormalIndependent },
                { PaylineType.SevenByFive, gamePayoutEngine.PayoutNormal }
            };
        }
Пример #2
0
 public MembersRepository(
     IHttpContextAccessor httpContextAccessor,
     IDatabaseManager databaseManager,
     CachedSettings cachedSettings,
     GamePayoutEngine gamePayoutEngine,
     PaylineRepository paylineRepository,
     SymbolRepository symbolRepository,
     HistoryDecoderFactory historyDecoderFactory,
     GameInfoRepository gameInfoRepository)
 {
     this.httpContextAccessor   = httpContextAccessor;
     this.databaseManager       = databaseManager;
     this.cachedSettings        = cachedSettings;
     this.gamePayoutEngine      = gamePayoutEngine;
     this.paylineRepository     = paylineRepository;
     this.symbolRepository      = symbolRepository;
     this.gameInfoRepository    = gameInfoRepository;
     this.historyDecoderFactory = historyDecoderFactory;
 }
        public MemberHistoryResult(
            GamePayoutEngine gamePayoutEngine,
            PaylineRepository paylineRepository,
            GameInfoRepository gameInfoRepository,
            GameHistory gameHistory,
            HistoryDecoderFactory historyDecoderFactory,
            SpinBetProfile spinBetProfile)
            : this(gamePayoutEngine, paylineRepository, gameInfoRepository, historyDecoderFactory)
        {
            this.gameHistory    = gameHistory;
            this.spinBetProfile = spinBetProfile;

            RoundId       = gameHistory.RoundId;
            TransactionId = GetTransactionId(this.gameHistory);
            TotalBet      = GetTotalBet();

            GameId         = gameHistory.Game.Id;
            Game           = gameHistory.Game.Name;
            TotalWin       = gameHistory.Win;
            GameResultType = gameHistory.GameResultType;
            XmlType        = gameHistory.XmlType;
            DateTimeUtc    = gameHistory.CreatedOnUtc;
            DateTime       = gameHistory.CreatedOnUtc.ToLocalTime();
            IsSideBet      = spinBetProfile?.IsSideBet == true;

            var historyXmlDecoder = historyDecoderFactory.Resolve((GameIdEnum)GameId);

            if (historyXmlDecoder != null)
            {
                historyXmlDecoder.AmendSpinHistory(this, gameHistory);
            }
            else
            {
                SetResultData();
            }
        }