All pastes #992651 Raw Edit

Anonymous

public text v1 · immutable
#992651 ·published 2008-04-22 00:15 UTC
rendered paste body
    class Game
    {
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new GameForm());
        }

        private void btnPlay_Click(object sender, EventArgs e)
        {
            List<Card> cards = new List<Card>();

            cards.Add(new Card("Lion", 8, 0, 0, 0, 0, 0));
            cards.Add(new Card("Cow", 2, 0, 0, 0, 0, 0));
            cards.Add(new Card("Elephant", 3, 0, 0, 0, 0, 0));
            cards.Add(new Card("Panda", 0, 0, 0, 0, 0, 0));
            cards.Add(new Card("Cheetah", 9, 0, 0, 0, 0, 0));
            cards.Add(new Card("Koala", 0, 0, 0, 0, 0, 0));
            cards.Add(new Card("Pidgeon", 0, 0, 0, 0, 0, 0));
            cards.Add(new Card("Swan", 0, 0, 0, 0, 0, 0));
            cards.Add(new Card("Ostrich", 10, 0, 0, 0, 0, 0));
            cards.Add(new Card("Squirrel", 0, 0, 0, 0, 0, 0));

            Random randomNumber = new Random();
            
            Stack<Card> deck = new Stack<Card>();

            while (cards.Count != 0)
            {
                int currentCardIndex = randomNumber.Next(0, cards.Count - 1);

                deck.Push(cards[currentCardIndex]);
                cards.Remove(cards[currentCardIndex]);
            }
        }