Пример #1
0
        private void CluePlayerDeck(object sender, Clue.SetGameItemsEventArgs e)
        {
            Random random = new Random();

            foreach (var item in e.Clues)
            {
                int index = random.Next(item.Value.Count);
                for (int i = 0; i < item.Value.Count; i++)
                {
                    if (i != index)
                    {
                        _cards.Add(new Card(item.Value[i], item.Key));
                    }
                }
            }
        }
Пример #2
0
        private void ClueAnswerCards(object sender, Clue.SetGameItemsEventArgs e)
        {
            Random random = new Random();

            AnswerCards = new List <Card>();

            foreach (var item in e.Clues)
            {
                int index = random.Next(item.Value.Count);
                for (int i = 0; i < item.Value.Count; i++)
                {
                    if (i == index)
                    {
                        AnswerCards.Add(new Card(item.Value[i], item.Key));
                    }
                }
            }
        }