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; }
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; }