Example #1
0
        public Game()
        {
            players = new Player[4];
            deck = new Deck();

            Player player1 = new Player("North");
            Player player2 = new Player("South");
            Player player3 = new Player("East");
            Player player4 = new Player("West");

            players[0] = player1;
            players[1] = player2;
            players[2] = player3;
            players[3] = player4;
        }
Example #2
0
        public Player[] DealHand(Player[] players)
        {
            Card[] player1Hand = new Card[13];
            Card[] player2Hand = new Card[13];
            Card[] player3Hand = new Card[13];
            Card[] player4Hand = new Card[13];

            for (int i = 0; i < 13; i++)
            {
                player1Hand[i] = deck[i * 1];
                player2Hand[i] = deck[i * 2];
                player3Hand[i] = deck[i * 3];
                player4Hand[i] = deck[i * 4];
            }

            players[0].newHand(player1Hand);
            players[1].newHand(player2Hand);
            players[2].newHand(player3Hand);
            players[3].newHand(player4Hand);

            return players;
        }