예제 #1
0
        public void NewGame()
        {
            Random rand = new Random();

            deckCitiesAndEvents = deckCitiesAndEvents.Concat(PlayerCardDeck.CreateCityCardDeck()).Concat(PlayerCardDeck.AddingEventCards()).ToList();
            roleDeck            = RoleCardDeck.AddingRoleCards();
            Console.WriteLine("Welcome to Pandemic");

            int numOfPlayers = AddingPlayers();
            var team         = CreateTeam(numOfPlayers);

            int userInput = 0;

            do
            {
            } while (userInput != 5);
        }
예제 #2
0
파일: Game.cs 프로젝트: ElzeKuiper/Pandemic
        public void DealCards()
        {
            //Create a deck with only city and event cards to deal to each player
            deckCitiesAndEvents = deckCitiesAndEvents.Concat(PlayerCardDeck.CreateCityCardDeck()).Concat(PlayerCardDeck.AddingEventCards()).ToList();

            //Generating a random int to pull a card from the deck with cities and events
            Random rand = new Random();

            Player player1 = new Player();

            player1.Hand = new List <PlayerDeck>();

            for (int i = 0; i < 4; i++)
            {
                int maxVal       = deckCitiesAndEvents.Count();
                int randomNumber = rand.Next(0, maxVal);
                player1.Hand.Add(deckCitiesAndEvents[randomNumber]);

                deckCitiesAndEvents.RemoveAt(randomNumber);
            }
        }