Exemple #1
0
        public Card pickCard(Deck deck)
        {
            // System.Console.WriteLine("    ");
            // System.Console.WriteLine("     ");
            // System.Console.WriteLine("picking card");

            onHand.Add(deck.topMost());
            // foreach (Card card in onHand)
            // {
            //     System.Console.WriteLine(card.stringVal);
            // }
            return(deck.topMost());
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Deck favDeck = new Deck();

            favDeck.resetDeck();
            Card topMost = favDeck.topMost();

            favDeck.resetDeck();
            favDeck.Shuffle();

            Player ho = new Player("Ho");

            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            System.Console.WriteLine("Number of cards on hand: " + ho.onHand.Count);
            ho.discardCard(8);
            ho.discardCard(1);
            ho.discardCard(2);
            ho.discardCard(0);
            System.Console.WriteLine("Number of cards on hand: " + ho.onHand.Count);
            ho.pickCard(favDeck);
            ho.pickCard(favDeck);
            System.Console.WriteLine("Number of cards on hand: " + ho.onHand.Count);
        }