Exemple #1
0
        private void EarnProcessFromRoll(int rolled)
        {
            int whoHad;

            if (rolled == 1 || rolled == 10)
            {
                EnumCareerType careerNeeded;
                if (rolled == 1)
                {
                    careerNeeded = EnumCareerType.Artist;
                }
                else
                {
                    careerNeeded = EnumCareerType.PoliceOfficer;
                }
                whoHad = _gameContainer.WhoHadCareerName(careerNeeded);
                if (whoHad > 0 && whoHad != _gameContainer.WhoTurn)
                {
                    _gameContainer.TakeOutExpense(10000);
                    _gameContainer.CollectMoney(whoHad, 10000);
                }
                if (rolled == 10)
                {
                    return;
                }
            }
            whoHad = WhoHadStock(rolled);
            if (whoHad > 0)
            {
                _gameContainer.CollectMoney(whoHad, 10000);
            }
        }
Exemple #2
0
        public async Task ChoseHouseAsync(int deck)
        {
            if (_gameContainer.CanSendMessage())
            {
                await _gameContainer.Network !.SendAllAsync("chosehouse", deck);
            }
            HouseInfo thisHouse = CardsModule.GetHouseCard(deck);
            await _gameContainer.ShowCardAsync(thisHouse);

            _gameContainer.SingleInfo !.Hand.Add(thisHouse);
            _gameContainer.SaveRoot !.HouseList.Clear();
            PopulatePlayerProcesses.FillInfo(_gameContainer.SingleInfo); //i think here too.
            _gameContainer.TakeOutExpense(thisHouse.HousePrice);
            _gameContainer.GameStatus = EnumWhatStatus.NeedToSpin;
            await _gameContainer.ContinueTurnAsync !.Invoke();
        }