Esempio n. 1
0
        private async Task ResumeSpinnerCompletedAsync()
        {
            _gameContainer.SaveRoot !.SpinList.Add(_gameBoard.NumberRolled);
            EarnProcessFromRoll(_gameBoard.NumberRolled);
            if (_gameContainer.Test !.NoAnimations == false)
            {
                await _gameContainer.Delay !.DelaySeconds(1);
            }
            if (_gameContainer.GameStatus == EnumWhatStatus.NeedToSpin)
            {
                _gameContainer.GameStatus = EnumWhatStatus.LastSpin;
            }
            if (_gameBoard.NumberRolled == 0)
            {
                BetweenNumbers();
                if (_gameContainer.SingleInfo !.PlayerCategory == EnumPlayerCategory.Self)
                {
                    await UIPlatform.ShowMessageAsync("Spin again because it landed between two numbers");
                }
                if (_gameContainer.GameStatus == EnumWhatStatus.LastSpin)
                {
                    _gameContainer.GameStatus = EnumWhatStatus.NeedToSpin;
                }
                await _gameContainer.ContinueTurnAsync !.Invoke();
                return;
            }
            await FinishSpinProcessAsync();

            if (_gameContainer.CanTradeForBig(false))
            {
                await UIPlatform.ShowMessageAsync("Current Player Is Getting The $100,000 for 2 8s, 9s or 10s spinned in a row for a lucky break for being entertainer");

                await _gameContainer.TradeForBigAsync();

                return;
            }
            IMoveProcesses move = _gameContainer.Resolver.Resolve <IMoveProcesses>();
            await move.PossibleAutomateMoveAsync();
        }
Esempio n. 2
0
 public PaydayMainGameClass(IGamePackageResolver resolver,
                            IEventAggregator aggregator,
                            BasicData basic,
                            TestOptions test,
                            PaydayVMData model,
                            IMultiplayerSaveState state,
                            IAsyncDelayer delay,
                            CommandContainer command,
                            PaydayGameContainer container,
                            StandardRollProcesses <SimpleDice, PaydayPlayerItem> roller,
                            GameBoardProcesses gameBoard,
                            IMailProcesses mailProcesses,
                            IDealProcesses dealProcesses,
                            ILotteryProcesses lotteryProcesses,
                            IYardSaleProcesses yardSaleProcesses,
                            IBuyProcesses buyProcesses,
                            IChoosePlayerProcesses playerProcesses,
                            IDealBuyChoiceProcesses choiceProcesses,
                            IMoveProcesses moveProcesses
                            ) : base(resolver, aggregator, basic, test, model, state, delay, command, container, roller)
 {
     _model             = model;
     _command           = command;
     _gameBoard         = gameBoard;
     _mailProcesses     = mailProcesses;
     _dealProcesses     = dealProcesses;
     _lotteryProcesses  = lotteryProcesses;
     _yardSaleProcesses = yardSaleProcesses;
     _buyProcesses      = buyProcesses;
     _playerProcesses   = playerProcesses;
     _choiceProcesses   = choiceProcesses;
     _gameContainer     = container;
     _gameContainer.OtherTurnProgressAsync = OtherTurnProgressAsync;
     _gameContainer.SpaceClickedAsync      = _gameBoard.AnimateMoveAsync;
     _gameContainer.ResultsOfMoveAsync     = moveProcesses.ResultsOfMoveAsync;
 }