Ejemplo n.º 1
0
        public void UpdateUserCardsInfo()
        {
            var json  = Http.GetStringAsync(cardsapi).Result;
            var cards = JsonConvert.DeserializeObject <carddata>(json);

            AllCards.Clear();
            AllCards.AddRange(cards.data);
            Save();
        }
Ejemplo n.º 2
0
        public void ResetState()
        {
            ActionsAvailable = 0;

            AllCards.Clear();
            Deck.Clear();
            Discard.Clear();
            Hand.Clear();
            Characters.Clear();
            Lessons.Clear();
            Creatures.Clear();
            Location.Clear();
            Match.Clear();
            Items.Clear();
            Adventure.Clear();
        }
Ejemplo n.º 3
0
        private void CollectionSet()
        {
            AllCards.Clear();
            _nextCards.Clear();
            _mainGrid.Children.Clear();
            if (ItemsSource == null)
            {
                return;
            }

            //Add all items to the queue.
            foreach (object o in ItemsSource)
            {
                _nextCards.Enqueue(o);
            }

            //Add the first three queue items as card to the view.
            for (int i = 0; i < 3; i++)
            {
                AddCardFromQueue();
            }
            SetCardSize();
        }