Ejemplo n.º 1
0
        public void HandlePlayerPlayToDeck(string cardId, int turn)
        {
            if (string.IsNullOrEmpty(cardId))
            {
                return;
            }
            LogEvent("PlayerPlayToDeck", cardId);
            _game.PlayerPlayToDeck(cardId);

            //without this update call the overlay deck does not update properly after having Card implement INotifyPropertyChanged
            Helper.MainWindow.Overlay.ListViewPlayer.Items.Refresh();
            Helper.MainWindow.PlayerWindow.ListViewPlayer.Items.Refresh();

            _game.AddPlayToCurrentGame(PlayType.PlayerPlayToDeck, turn, cardId);
            GameEvents.OnPlayerPlayToDeck.Execute(GameV2.GetCardFromId(cardId));
        }