Esempio n. 1
0
        private async Task ContinueDealProcessesAsync()
        {
            var thisDeal = _gameContainer.SaveRoot !.DealListLeft.First();

            _gameContainer.SaveRoot.DealListLeft.RemoveFirstItem();
            _gameContainer.SaveRoot.Instructions = $"Do you want to buy {thisDeal.Business} for {thisDeal.Cost.ToCurrency(0)}?  The value is {thisDeal.Value.ToCurrency(0)}";
            _gameContainer.SaveRoot.CurrentDeal  = thisDeal;
            _model.DealPile !.AddCard(thisDeal);
            _gameContainer.SaveRoot.GameStatus = EnumStatus.ChooseDeal;
            await _gameContainer.ContinueTurnAsync !.Invoke();
        }
Esempio n. 2
0
        void IDealProcesses.SetUpDeal()
        {
            var list = _gameContainer.Random.GenerateRandomList(24);

            if (list.Count != 24)
            {
                throw new BasicBlankException($"Must have 24 deal cards, not {list.Count} cards");
            }
            _gameContainer.SaveRoot !.DealListLeft.Clear();
            list.ForEach(index =>
            {
                DealCard thisCard = (DealCard)_gameContainer !.GetCard(index);
                _gameContainer.SaveRoot.DealListLeft.Add(thisCard);
            });
            _gameContainer.SaveRoot.YardSaleDealCard = _gameContainer.SaveRoot.DealListLeft.First();
            _gameContainer.SaveRoot.DealListLeft.RemoveFirstItem();
        }