/// <summary>
        /// Method is wired up to the GameUpdated even on the game state controller.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        public void Controller_GameUpdated(object sender, GameUpdatedEventArgs args)
        {
            Debug.Assert(PlayerIndex != -1, "The PlayerIndex was not initailzed on PlayerPanel.");

            IsPlayersTurn = args.NewGame.CurrentPlayerIndex == PlayerIndex;
            PlayerOverlay.GameScore = args.NewGame.GameScores[PlayerIndex].Sum(roundHand => roundHand.Score);
            PlayerOverlay.Score = args.NewGame.Hands[PlayerIndex].Score;
            playerHand.Cards = args.NewGame.Hands[PlayerIndex];
        }
        private void Controller_GameUpdated(object sender, GameUpdatedEventArgs e)
        {
            CurrentPlayer.Text = "Current Player: " + e.NewGame.CurrentPlayer.Username;
            Round.Text = "Round: " + e.NewGame.Round;
            Turn.Text = "Turn: " + e.NewGame.Turn;
            Cycle.Text = "Cycle: " + e.NewGame.Cycle;

            if (e.NewGame.State == GameStates.Finished)
            {
                GameOver gameOverDisplay = new GameOver(e.NewGame)
                {
                    HorizontalAlignment = HorizontalAlignment.Center,
                    VerticalAlignment = VerticalAlignment.Center
                };
                Grid.SetColumnSpan(gameOverDisplay, 3);
                Grid.SetRowSpan(gameOverDisplay, 3);
                MainGrid.Children.Add(gameOverDisplay);
            }

            if (e.NewGame.VisibleCard == null)
            {
                VisibleCard.Content = null;
            }
            else if (e.NewGame.VisibleCard.CardType == ColorettoCardTypes.Color)
            {
                PlayerHandCard card = new PlayerHandCard { CardColor = e.NewGame.VisibleCard.Color };
                VisibleCard.Content = card;
            }
            else if (e.NewGame.VisibleCard.CardType == ColorettoCardTypes.Wild)
            {
                VisibleCard.Content = new PlayerHandWildCard();
            }
            else if (e.NewGame.VisibleCard.CardType == ColorettoCardTypes.Plus2)
            {
                VisibleCard.Content = new PlayerHandPlusTwoCard();
            }

            // The stacks should be listening themselves.
            Stacks.UpdatePiles(e.NewGame.Piles);
        }