Beispiel #1
0
        public bool PullOutBooks(Player player)
        {
            // Pull out a player's books. Return true if the player ran out of cards, otherwise
            // return false. Each book is added to the Books dictionary. A player runs out of
            // cards when he’'s used all of his cards to make books—and he wins the game.
            IEnumerable <Values> booksPulled = player.PlayerPullOutBooks();

            foreach (Values value in booksPulled)
            {
                books.Add(value, player);
            }
            if (player.CardCount == 0)
            {
                return(true);
            }
            return(false);
        }