Example #1
0
 /// <summary>
 /// Rotate the wheels, using the given ILogicSymbolGenerator implementation
 /// </summary>
 /// <param name="logicSymbolGenerator"></param>
 public void Rotate(ILogicSymbolGenerator logicSymbolGenerator)
 {
     for (int wheelNo = 0; wheelNo < Configuration.Constants.NoOfWheels; wheelNo++)
     {
         _symbols[wheelNo] = logicSymbolGenerator.GetWheelSymbol();
     }
 }
Example #2
0
        public ModelAutoPlay(
            ILogicCalculateWinnings logicCalculateWinnings,
            ILogicSymbolGenerator logicSymbolGenerator,
            int noOfRunsInAutoPlay,
            int updateThreshold)
        {
            CurrentAutoPlayState = Enums.AutoPlayState.BeforeFirstInteraction;
            NoOfRuns             = noOfRunsInAutoPlay;
            PercentCompleted     = 0;
            PercentPayback       = 100;
            _updateThreshold     = updateThreshold;
            _autoRunData         = new Dictionary <int, int>();
            _symbols             = new WheelSymbolList();

            _autoCommand = new AutoPlayControllerCommand(this);

            _logicCalculateWinnings = logicCalculateWinnings;
            _logicSymbolGenerator   = logicSymbolGenerator;

            _progressHandler         = new Progress <int>(i => { OnPropertyChanged(nameof(PercentCompleted)); });
            _cancellationTokenSource = null;
        }
Example #3
0
        public ModelNormalPlay(
            ILogicCalculateWinnings logicCalculateWinnings,
            ILogicSymbolGenerator logicSymbolGenerator,
            int initialCredits,
            int noOfRotationsPerSpin,
            int rotationDelayMilliSecs) : base(new List <IPropertySource>())
        {
            _noOfRotationsPerSpin   = noOfRotationsPerSpin;
            _rotationDelayMilliSecs = rotationDelayMilliSecs;

            _noOfCredits           = initialCredits;
            _symbols               = new WheelSymbolList();
            CurrentNormalPlayState = Enums.NormalPlayState.BeforeFirstInteraction;

            _spinCommand      = new SpinControllerCommand(this);
            _addCreditCommand = new AddCreditsControllerCommand(this);

            _logicCalculateWinnings = logicCalculateWinnings;
            _logicSymbolGenerator   = logicSymbolGenerator;

            AddCommandDependency(nameof(IModelNormalPlay.CurrentNormalPlayState), _spinCommand);
            AddCommandDependency(nameof(IModelNormalPlay.CurrentNormalPlayState), _addCreditCommand);
        }