public UnoGame(UnoBehavior[] behaviors)
        {
            int numOfPlayers = behaviors.Length;
            Random r = new Random();
            this.deck = new UnoDeck();
            this.players = new UnoBot[numOfPlayers];
            this.currentTurn = r.Next(0, numOfPlayers);

            for (int i = 0; i < this.players.Length; i++)
            {
                this.players[i] = new UnoBot(this, behaviors[i], i);
            }

            this.DealHands();
        }
Exemple #2
0
        public UnoGame(UnoBehavior[] behaviors)
        {
            int    numOfPlayers = behaviors.Length;
            Random r            = new Random();

            this.deck        = new UnoDeck();
            this.players     = new UnoBot[numOfPlayers];
            this.currentTurn = r.Next(0, numOfPlayers);

            for (int i = 0; i < this.players.Length; i++)
            {
                this.players[i] = new UnoBot(this, behaviors[i], i);
            }

            this.DealHands();
        }