Exemple #1
0
        static void Game()
        {
            Console.Clear();
            CardDesk d = new CardDesk();

            d.MixDesk(100000);
            Player p1 = new Player();
            Player p2 = new Player();
            Player p3 = new Player();
            Player p4 = new Player();
            Player p5 = new Player();
            Board  b  = new Board();

            b.PutCard(d.GetCardOnTop());
            b.PutCard(d.GetCardOnTop());
            b.PutCard(d.GetCardOnTop());
            b.PutCard(d.GetCardOnTop());
            b.PutCard(d.GetCardOnTop());
            p1.PutCardHand(d.GetCardOnTop());
            p1.PutCardHand(d.GetCardOnTop());
            p2.PutCardHand(d.GetCardOnTop());
            p2.PutCardHand(d.GetCardOnTop());
            p3.PutCardHand(d.GetCardOnTop());
            p3.PutCardHand(d.GetCardOnTop());
            p4.PutCardHand(d.GetCardOnTop());
            p4.PutCardHand(d.GetCardOnTop());
            p5.PutCardHand(d.GetCardOnTop());
            p5.PutCardHand(d.GetCardOnTop());
            PrintPlayer(p1, b);
            PrintPlayer(p2, b);
            PrintPlayer(p3, b);
            PrintPlayer(p4, b);
            PrintPlayer(p5, b);
        }
Exemple #2
0
 public void GetCards(CardDesk d, int count)
 {
     for (int i = 0; i < count; i++)
     {
         Card c = d.GetCardOnTop();
         if (c != null)
         {
             Hand.Add(c);
         }
         else
         {
             break;
         }
     }
 }