internal void BindAction(RoundAction possibleAction)
        {
            Action = possibleAction;

            LabelHeader.Content      = Action.Action.Title;
            LabelDescription.Content = Action.Action.Description;

            LabelCost.Content    = Action.CostString == null ? "" : "Cost: " + Action.CostString;
            LabelRisk.Content    = Action.RiskString == null ? "" : "Risk: " + Action.RiskString;
            LabelBenefit.Content = Action.BenefitString == null ? "" : "Benefit: " + Action.BenefitString;

            baseBrush = Action.Action.CancelTaskFor == null ? defaultBrush : cancelBrush;
            UpdateBackground();
        }
        public void CommitAction(RoundAction a)
        {
            if (InJail || Dead)
            {
                return;
            }

            CurrentRoundAction = a;
            a.Action.CommitAction(this, a.Action, a.Media);
            if (a.Media != null)
            {
                a.Media.Reacted = true;
            }

            if (a.Action.NumQuarters > 1)
            {
                PartialProject p = new PartialProject()
                {
                    Project = a.Action, QuartersRemaining = a.Action.NumQuarters, Media = a.Media
                };
                PartialProjects.Add(p);
            }
        }
        private void ActionClicked(RoundAction obj)
        {
            if (obj == EndRoundAction)
            {
                // Start the next round
                GameEngine.CompleteRound();
                GameEngine.BeginRound();
                UpdateUIForQuarter();

                // Did player die? If so, we're going to game over.
                if (HumanPlayer.Dead)
                {
                    LinkedWindow.GameOver(HumanPlayer);
                }
            }
            else if (obj == RetireAction)
            {
                GameEngine.CompleteRound();
                HumanPlayer.Retired = true;
                LinkedWindow.GameOver(HumanPlayer);
            }
            else
            {
                // Commit the action, and rebuild the UI to reflect the changes.
                HumanPlayer.CommitAction(obj);

                // Find result from RoundAction object.
                if (obj.ResultString != null)
                {
                    SetStatusText(obj.ResultString, obj.ResultPositive ? Brushes.DarkGreen : Brushes.DarkRed);
                }

                RebuildStatus();
                RebuildNewsItems();
                RebuildActionItems();
            }
        }