Beispiel #1
0
 //constructor
 public Game(string p1, string p2)
 {
     cardStock = new CardStock();
     player1   = new Player(p1);
     player2   = new Player(p2);
     cardStock.Mix();
     cardStock.Distribute(player1, player2);
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            //designing the console window
            Console.BackgroundColor = ConsoleColor.White;
            Console.ForegroundColor = ConsoleColor.Black;
            Console.Clear();

            //start the game
            Console.WriteLine("enter 2 names of players:\n");
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            Game   g = new Game(a, b);

            CardStock card = new CardStock();

            g.Step();
            Console.WriteLine(g.Winner());

            Console.WriteLine(card.ToString());
            Console.WriteLine(g.player1.ToString());
            Console.WriteLine(g.player2.ToString());
        }