Exemplo n.º 1
0
        public TurnContextViewModel(TurnContext currentTurn, Player player)
        {
            GameIsComplete = currentTurn.Game.IsComplete;

            if (currentTurn.ActivePlayer == player && !GameIsComplete)
            {
                BuyCount         = currentTurn.Buys;
                RemainingActions = currentTurn.RemainingActions;
                AvailableSpend   = new AvailableSpendViewModel(currentTurn.AvailableSpend);
                IsActive         = true;
                InBuyStep        = currentTurn.InBuyStep;
            }
            else
            {
                AvailableSpend = new AvailableSpendViewModel(new CardCost(0));
                IsActive       = false;
            }

            ActivePlayerName = currentTurn.ActivePlayer.Name;
        }
Exemplo n.º 2
0
        public TurnContextViewModel(TurnContext currentTurn, Player player)
        {
            GameIsComplete = currentTurn.Game.IsComplete;
            
            if(currentTurn.ActivePlayer == player && !GameIsComplete)
            {
                BuyCount = currentTurn.Buys;
                RemainingActions = currentTurn.RemainingActions;
                AvailableSpend = new AvailableSpendViewModel(currentTurn.AvailableSpend);
                IsActive = true;
                InBuyStep = currentTurn.InBuyStep;
            }
            else
            {
                AvailableSpend = new AvailableSpendViewModel(new CardCost(0));
                IsActive = false;
            }

            ActivePlayerName = currentTurn.ActivePlayer.Name;
            
        }