Example #1
0
        public UnemployedAssistantViewModel(string userName, Player player, int index)
        {
            IsPlayerBoardOfActivePlayer = player.Id == player.Game.CurrentPlayer.Id;
            IsActivePlayer     = FormHelper.IsActivePlayer(userName, player.Game);
            IsValidActionState = player.Game.CurrentTurn.CurrentAction.State == GameActionState.MediaCenter;
            ActionLocation     = index.ToString();

            Player = player;
            State  = GameActionState.Hire;

            AssistantIndex = index;
            AssistantCost  = AssistantManager.GetAssistantCostByIndex(index);
            IsAvailable    = player.Assistants.Count - 2 <= index;
            SetAssistantCssClass(IsAvailable, player);
        }