Esempio n. 1
0
        static void Main(string[] args)
        {
            int             numberOfPlayers = 2;
            CardDistributor cardDistributor = new CardDistributor(CardDeckMaker.GetCardDeck());
            Diller          diller          = new Diller(cardDistributor, numberOfPlayers);
            Player          player          = new Player(diller, cardDistributor);

            diller.ConnectWithPlayer = player;
            diller.newDistribut();
            while (true)
            {
                Console.Clear();
                Console.WriteLine("\tКарты диллера");
                Console.WriteLine();
                diller.ShowCards();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine();
                Console.WriteLine("\tВаши карты");
                Console.WriteLine();
                player.ShowCards();
                Console.WriteLine();
                Console.WriteLine("\tЧтобы взять карту, нажмите 1");
                Console.WriteLine("\tЧтобы вскрыть диллера, нажмите 2");
                player.ScoreCount();
                diller.ScoreCount();
                if (diller.CardsDisplayFlag)
                {
                    continue;
                }
                char key = Console.ReadKey().KeyChar;
                switch (key)
                {
                case '1':
                    player.GetOneCard();
                    break;

                case '2':
                    diller.OpenDiller();
                    break;
                }
            }
        }
Esempio n. 2
0
 public Player(Diller diller, CardDistributor cardDistributor)
 {
     this.diller          = diller;
     this.cardDistributor = cardDistributor;
 }